text
stringlengths
2
1.04M
meta
dict
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace MiniPrism { using System; /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class RegionNames { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal RegionNames() { } /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MiniPrism.RegionNames", typeof(RegionNames).Assembly); resourceMan = temp; } return resourceMan; } } /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// <summary> /// Looks up a localized string similar to RegionA. /// </summary> public static string RegionA { get { return ResourceManager.GetString("RegionA", resourceCulture); } } } }
{ "content_hash": "864f368794e05fd732add4a99ff880e5", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 168, "avg_line_length": 42.18055555555556, "alnum_prop": 0.5992756009219624, "repo_name": "phenixita/MiniPrism", "id": "889c19040f9ba7315294992e36021f276c2e1dbd", "size": "3039", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "MiniPrism/RegionNames.Designer.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "5184" }, { "name": "Smalltalk", "bytes": "1230" } ], "symlink_target": "" }
class GlobalErrorObserver : public base::CheckedObserver { public: // Called whenever the set of GlobalErrors has changed. virtual void OnGlobalErrorsChanged() = 0; }; #endif // CHROME_BROWSER_UI_GLOBAL_ERROR_GLOBAL_ERROR_OBSERVER_H_
{ "content_hash": "027f4a972a1ab8891648e52aa17c160e", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 66, "avg_line_length": 34.42857142857143, "alnum_prop": 0.7593360995850622, "repo_name": "chromium/chromium", "id": "b6db969f371a96d09d8dd05dd01f8a58cf5081db", "size": "553", "binary": false, "copies": "6", "ref": "refs/heads/main", "path": "chrome/browser/ui/global_error/global_error_observer.h", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
package org.seasar.doma.jdbc; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import java.sql.SQLException; import javax.sql.DataSource; import org.junit.jupiter.api.Test; public class SimpleDataSourceTest { @Test public void testUrlIsNull() { SimpleDataSource dataSource = new SimpleDataSource(); dataSource.setUser("user"); dataSource.setPassword("password"); try { dataSource.getConnection(); fail(); } catch (SQLException e) { e.printStackTrace(); } } @Test public void testNoSuitableDriverFound() { SimpleDataSource dataSource = new SimpleDataSource(); dataSource.setUser("user"); dataSource.setPassword("password"); dataSource.setUrl("url"); try { dataSource.getConnection(); fail(); } catch (SQLException e) { e.printStackTrace(); } } @Test public void testIsWrapperFor() throws Exception { DataSource dataSource = new SimpleDataSource(); assertTrue(dataSource.isWrapperFor(SimpleDataSource.class)); assertFalse(dataSource.isWrapperFor(Runnable.class)); } @Test public void testUnwrap() throws Exception { DataSource dataSource = new SimpleDataSource(); assertNotNull(dataSource.unwrap(SimpleDataSource.class)); try { dataSource.unwrap(Runnable.class); fail(); } catch (SQLException ignored) { } } }
{ "content_hash": "b3a0ec43666da56806ce831dbbf4c506", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 64, "avg_line_length": 26.82758620689655, "alnum_prop": 0.7095115681233933, "repo_name": "domaframework/doma", "id": "0d9802db2c0b4c478887336d4975330c3647d6dc", "size": "1556", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "doma-core/src/test/java/org/seasar/doma/jdbc/SimpleDataSourceTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "4179496" }, { "name": "Kotlin", "bytes": "194380" } ], "symlink_target": "" }
ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
{ "content_hash": "4ccc0c8d71c962ed79b9ca2d42a20c62", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 31, "avg_line_length": 9.692307692307692, "alnum_prop": 0.7063492063492064, "repo_name": "mdoering/backbone", "id": "6b59b6ff2f4d8869c5a022eedd326c3dcade8123", "size": "192", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Aquifoliales/Aquifoliaceae/Ilex/Ilex paraguariensis/Ilex paraguariensis latifolia/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<a name="2.0.0-rc.6"></a> # [2.0.0-rc.6](https://github.com/aurelia/dialog/compare/2.0.0-rc.5...2.0.0-rc.6) (2019-05-31) ### Bug Fixes * **build:** adjust umd build, add umd-es2015 ([342c023](https://github.com/aurelia/dialog/commit/342c023)) * **package.json:** fix package.json ([5ae0d3a](https://github.com/aurelia/dialog/commit/5ae0d3a)) ### Features * **dialog-renderer:** add native dialog renderer close [#338](https://github.com/aurelia/dialog/issues/338) ([9da52fe](https://github.com/aurelia/dialog/commit/9da52fe)) * **keyboard:** allow to configure keyevent type ([2f57949](https://github.com/aurelia/dialog/commit/2f57949)) <a name="2.0.0-rc.5"></a> # [2.0.0-rc.5](https://github.com/aurelia/dialog/compare/2.0.0-rc.4...2.0.0-rc.5) (2019-01-21) ### Bug Fixes * **build:** correct namespace for umd build ([b3b08e7](https://github.com/aurelia/dialog/commit/b3b08e7)) <a name="2.0.0-rc.4"></a> # [2.0.0-rc.4](https://github.com/aurelia/dialog/compare/2.0.0-rc.3...2.0.0-rc.4) (2019-01-19) ### Bug Fixes * **build:** add umd build to build script ([0c46fdc](https://github.com/aurelia/dialog/commit/0c46fdc)) * **build:** update rollup dep, config ([0c9e029](https://github.com/aurelia/dialog/commit/0c9e029)) * **doc:** fix html5 syntax ([629ad1c](https://github.com/aurelia/dialog/commit/629ad1c)), closes [/github.com/aurelia/templating/pull/647#issuecomment-427989601](https://github.com//github.com/aurelia/templating/pull/647/issues/issuecomment-427989601) ### Features * **keyboard:** allow to configure keyevent type ([3aad34f](https://github.com/aurelia/dialog/commit/3aad34f)) <a name="2.0.0-rc.3"></a> # [2.0.0-rc.3](https://github.com/aurelia/dialog/compare/2.0.0-rc.2...2.0.0-rc.3) (2018-08-22) ### Bug Fixes * **resources:** use named exports instead of default ([4033216](https://github.com/aurelia/dialog/commit/4033216)) <a name="2.0.0-rc.2"></a> # [2.0.0-rc.2](https://github.com/aurelia/dialog/compare/2.0.0-rc.1...2.0.0-rc.2) (2018-08-22) ### Bug Fixes * **attach-focus:** AttachFocus must be the default export fix [#358](https://github.com/aurelia/dialog/issues/358) ([fb5e829](https://github.com/aurelia/dialog/commit/fb5e829)) <a name="2.0.0-rc.1"></a> # [2.0.0-rc.1](https://github.com/aurelia/dialog/compare/1.0.0...2.0.0-rc.1) (2018-08-21) ### Bug Fixes * **css:** update styles to use ux- prefix instead of ai- ([f29d8cb](https://github.com/aurelia/dialog/commit/f29d8cb)), closes [#306](https://github.com/aurelia/dialog/issues/306) * **package.json:** add missing dependency ([ed9c5df](https://github.com/aurelia/dialog/commit/ed9c5df)) ### Features * **attach-focus:** make work as boolean attr ([f75abb4](https://github.com/aurelia/dialog/commit/f75abb4)), closes [#349](https://github.com/aurelia/dialog/issues/349) * **resources:** register resources by class ([#354](https://github.com/aurelia/dialog/issues/354)) ([ff55c80](https://github.com/aurelia/dialog/commit/ff55c80)) ### BREAKING CHANGES * **resources:** - default resources are no longer reexported, need to be explicitly included when bundling <a name="1.0.0"></a> # [1.0.0](https://github.com/aurelia/dialog/compare/1.0.0-rc.2.0.0...1.0.0) (2018-07-23) ### Bug Fixes * **DI:** use static method for Element ([700dd62](https://github.com/aurelia/dialog/commit/700dd62)) * **doc:** correct link from dialog to bootstraping ([432533d](https://github.com/aurelia/dialog/commit/432533d)) <a name="1.0.0-rc.2.0.0"></a> # [1.0.0-rc.2.0.0](https://github.com/aurelia/dialog/compare/1.0.0-rc.1.0.3...1.0.0-rc.2.0.0) (2017-11-05) ### Bug Fixes * **dialog-configuration:** set defaults for ".renderer" and ".cssText" ([fd58f2a](https://github.com/aurelia/dialog/commit/fd58f2a)), closes [#307](https://github.com/aurelia/dialog/issues/307) * **dialog-renderer:** lazy DOM access fix [#294](https://github.com/aurelia/dialog/issues/294) ([f71ecf8](https://github.com/aurelia/dialog/commit/f71ecf8)) * **dialog-service:** fix no fail for undefined moduleId ([e90a9d8](https://github.com/aurelia/dialog/commit/e90a9d8)), closes [#312](https://github.com/aurelia/dialog/issues/312) * **typings:** fix as it was in [#280](https://github.com/aurelia/dialog/issues/280) ([c6dd762](https://github.com/aurelia/dialog/commit/c6dd762)) ### Features * **dialog-controller:** add param to canDeactivate / deactivate functions. ([42ad7f3](https://github.com/aurelia/dialog/commit/42ad7f3)) * **dialog-controller:** pass close result to lifecycle hooks ([320504c](https://github.com/aurelia/dialog/commit/320504c)) ### BREAKING CHANGES * **dialog-controller:** - DialogController.prototype.error wraps the passed reason in DialogCloseError <a name="1.0.0-rc.1.0.3"></a> # [1.0.0-rc.1.0.3](https://github.com/aurelia/dialog/compare/1.0.0-rc.1.0.2...v1.0.0-rc.1.0.3) (2017-05-05) ### Bug Fixes * **dialog-renderer:** don't cancel events fix [#281](https://github.com/aurelia/dialog/issues/281) ([9a92123](https://github.com/aurelia/dialog/commit/9a92123)) <a name="1.0.0-rc.1"></a> # [1.0.0-rc.1](https://github.com/aurelia/dialog/compare/1.0.0-beta.3.0.1...v1.0.0-rc.1) (2017-04-28) ### Bug Fixes * **dialog-configuration:** fix [#264](https://github.com/aurelia/dialog/issues/264) add missing padding unit ([902c921](https://github.com/aurelia/dialog/commit/902c921)) * **dialog-configuration:** use PLATFORM.moduleName ([9dc62ff](https://github.com/aurelia/dialog/commit/9dc62ff)) * **dialog-renderer:** check for transitions ([ed77c85](https://github.com/aurelia/dialog/commit/ed77c85)) * **dialog-renderer:** let click events bubble ([6a03bbd](https://github.com/aurelia/dialog/commit/6a03bbd)) * **enableescclose:** default to true ([58bfc88](https://github.com/aurelia/dialog/commit/58bfc88)) * **lefecycle:** handle thrown errors ([e7f1284](https://github.com/aurelia/dialog/commit/e7f1284)) * **lifecycle:** fix lifecycle methods default value ([67a5c64](https://github.com/aurelia/dialog/commit/67a5c64)) ### Features * **all:** migrate to TS ([5a68ca3](https://github.com/aurelia/dialog/commit/5a68ca3)) * **all:** remove "lock" setting ([a0fd54a](https://github.com/aurelia/dialog/commit/a0fd54a)) * **all:** switch prefix - "ai" => "ux" ([817be7f](https://github.com/aurelia/dialog/commit/817be7f)) * **dialog options:** allow esc to close dialog without lock: false ([c0baaf5](https://github.com/aurelia/dialog/commit/c0baaf5)) * **dialog-service:** add .closeAll() ([76048e6](https://github.com/aurelia/dialog/commit/76048e6)) * **dialog-service:** add .closeAll() ([f59dfc7](https://github.com/aurelia/dialog/commit/f59dfc7)) * **dialog-service:** refactor consolidate open methods in one ([676ee58](https://github.com/aurelia/dialog/commit/676ee58)) * **dialog-service:** refactor consolidate open methods in one ([dc44a34](https://github.com/aurelia/dialog/commit/dc44a34)) * **dialog-service, dialog-controller:** add "rejectOnCancel" ([e8cd8e5](https://github.com/aurelia/dialog/commit/e8cd8e5)) * **dialog-settings, dialog-renderer:** add host ([4aebd63](https://github.com/aurelia/dialog/commit/4aebd63)) * **dialog-settings, dialog-service:** add childContainer ([db0aca5](https://github.com/aurelia/dialog/commit/db0aca5)) # 1.0.0-beta.3.0.1 ## Bug Fixes * **dialog-service:** .open() proper error propagation * **dialog-controller:** clear close promise when canDeactivate=>false * **dialog-renderer, dialog-service:** fix settings merging * **dialog-renderer:** do not track controllers per renderer instance * **dialog-service:** fix remove controllers closed with .error * **styles:** make ai-dialog display:table <a name="1.0.0-beta.3.0.0"></a> # [1.0.0-beta.3.0.0](https://github.com/aurelia/dialog/compare/1.0.0-beta.2.0.0...v1.0.0-beta.3.0.0) (2016-07-27) ### Bug Fixes * **dialog-configuration:** Add settings to configuration types and docs. ([7d5f6b8](https://github.com/aurelia/dialog/commit/7d5f6b8)) * **dialog-configuration:** correct typings ([541cd8e](https://github.com/aurelia/dialog/commit/541cd8e)) * **dialog-configuration:** do not inject empty styling ([6c48a8c](https://github.com/aurelia/dialog/commit/6c48a8c)) * **dialog-configuration:** Fix useRenderer typing ([451cd2c](https://github.com/aurelia/dialog/commit/451cd2c)) * **dialog-configuration:** register renderer as transient ([901a004](https://github.com/aurelia/dialog/commit/901a004)), closes [aurelia/dialog#180](https://github.com/aurelia/dialog/issues/180) ### Features * **dialog-service:** rename openc to openAndYieldController ([d21458d](https://github.com/aurelia/dialog/commit/d21458d)) <a name="1.0.0-beta.2.0.0"></a> # [1.0.0-beta.2.0.0](https://github.com/aurelia/dialog/compare/1.0.0-beta.1.1.0...v1.0.0-beta.2.0.0) (2016-07-12) ### Bug Fixes * **dialog-configuration:** setup default renderer ([2c4c1fb](https://github.com/aurelia/dialog/commit/2c4c1fb)), closes [#129](https://github.com/aurelia/dialog/issues/129) <a name="1.0.0-beta.1.1.0"></a> # [1.0.0-beta.1.1.0](https://github.com/aurelia/dialog/compare/1.0.0-beta.1.0.2...v1.0.0-beta.1.1.0) (2016-06-22) ### 0.6.2 (2016-05-24) #### Bug Fixes * **dialog-service:** add host element to container (#152) ([bcd24532](https://github.com/aurelia/dialog/commit/bcd2453248eada5c6595a53083bcc9dfacbec9e6), closes [#150](https://github.com/aurelia/dialog/issues/150)) * **dialogResult:** export DialogResult for dts (#153) ([736f6fa1](https://github.com/aurelia/dialog/commit/736f6fa1eacc612d65c80ce66b577ef034c67f7b), closes [#134](https://github.com/aurelia/dialog/issues/134)) ### 0.6.1 (2016-05-17) #### Bug Fixes * **style:** alter div styles ([388bffac](https://github.com/aurelia/dialog/commit/388bffac91d9f952d7b9ad30d2f781c6d9264735), closes [#148](https://github.com/aurelia/dialog/issues/148)) ## 0.6.0 (2016-05-10) #### Bug Fixes * **dialog.css:** fix close button positioning ([ca7af613](https://github.com/aurelia/dialog/commit/ca7af613be6f7c820d3493fe448314ac8c34887e), closes [#128](https://github.com/aurelia/dialog/issues/128)) * **renderer:** modal scrolling, close behavior ([75f9606a](https://github.com/aurelia/dialog/commit/75f9606adf1671da3e4846c6ad9faca3253357a1), closes [#125](https://github.com/aurelia/dialog/issues/125), [#103](https://github.com/aurelia/dialog/issues/103)) ### 0.5.10 (2016-03-23) #### Bug Fixes * **build:** incorrect build configuration ([f03146ee](https://github.com/aurelia/dialog/commit/f03146ee66ec3545d508f62de3bb618a064b4b2f)) ### 0.5.9 (2016-03-22) #### Features * **dialog:** track controllers in service ([b58d17f5](https://github.com/aurelia/dialog/commit/b58d17f5d1bd4461ad1fb5f943de63d6ce8b81bd), closes [#121](https://github.com/aurelia/dialog/issues/121)) ### 0.5.8 (2016-03-10) #### Bug Fixes * **dialog:** put back centerDialog ([1e03984a](https://github.com/aurelia/dialog/commit/1e03984a4163ab9999b2890d5f70f19f2d8ded9e)) * **dialog-controller:** * remove promise pyramid of doom ([e5d42e3f](https://github.com/aurelia/dialog/commit/e5d42e3fa5a63032d298a4e2fd7c5eaec18de3f7)) * fix the class interface ([7ac0be86](https://github.com/aurelia/dialog/commit/7ac0be86d7a98964d8c30f27e3669004549d93d5), closes [#82](https://github.com/aurelia/dialog/issues/82)) #### Features * **position:** allow to pass in callback to do setup on elements ([825e0e16](https://github.com/aurelia/dialog/commit/825e0e16a7b456ba40f009b590d909b3dc499bdc)) ### 0.5.7 (2016-03-01) #### Bug Fixes * **dialog:** * allow response to click events ([1fd3bfc8](https://github.com/aurelia/dialog/commit/1fd3bfc89d736fdbf4f7fc407a2fbb7630ab5e7e)) * allow response to click events ([ec8a8ce0](https://github.com/aurelia/dialog/commit/ec8a8ce0aba4965e7793a9aa074c5e3074b85570)) * accessibility fixes ([79a796da](https://github.com/aurelia/dialog/commit/79a796da73ce94336e0d1eaf28acb964247dec8c)) #### Features * use attach-focus attribute value to decide if the element is to be focused ([ceb7196f](https://github.com/aurelia/dialog/commit/ceb7196fbb226ae1f6de25222460ebb6fddaa8e5)) * **z-index:** make z-index configurable ([e9d164f5](https://github.com/aurelia/dialog/commit/e9d164f592a5409785ef94b9590ae689c3115485), closes [#90](https://github.com/aurelia/dialog/issues/90)) ### 0.5.6 (2016-02-09) #### Bug Fixes * **changelog:** fix changelog generation ([3f123e38](https://github.com/aurelia/dialog/commit/3f123e38987e9326e6086a18e3a47aec59df3350), closes [#71](https://github.com/aurelia/dialog/issues/71)) * **ie:** clicking overlay closes ([2c4cfa63](https://github.com/aurelia/dialog/commit/2c4cfa635e178071cd8080384cfc1592cbfbaef2), closes [#87](https://github.com/aurelia/dialog/issues/87)) ## 0.5.4 (2016-01-30) * feat(all): update jspm meta; core-js; aurelia deps * fix(deps): move aurelia-pal to dev-dep * disable pointer events on ai-dialog-container * fix(dialog): use CSS auto margins instead of JS ### 0.5.1 (2015-12-03) * Destroy modal only when modalContainer ends its transition * incorrect DialogFooter name ### 0.2.1 (2015-09-07) #### Bug Fixes * **dialog:** Update link to `require` ([3caf3a7d](https://github.com/aurelia/dialog/commit/3caf3a7de0435754bd6707ad2e790efafd84b7dc)) ## 0.2.0 (2015-09-05) #### Bug Fixes * **build:** update linting, testing and tools ([9b011a5e](https://github.com/aurelia/dialog/commit/9b011a5ecd89ccd097b96bfa286a3515f76405df)) * **dialog-service:** update to latest templating ([3a2c7edd](https://github.com/aurelia/dialog/commit/3a2c7edd1365debd8a764d28a64356e1f11fa313)) ### 0.1.1 (2015-08-24) ### 0.1.1 (2015-08-24)
{ "content_hash": "a42c6fdf8b90e1832bd8d2acb105e722", "timestamp": "", "source": "github", "line_count": 325, "max_line_length": 258, "avg_line_length": 41.646153846153844, "alnum_prop": 0.7178426302179535, "repo_name": "StrahilKazlachev/dialog", "id": "257893b50da9b660601ea5c7d9a7013fcadcf3ad", "size": "13535", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "doc/CHANGELOG.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "2656" }, { "name": "JavaScript", "bytes": "5756" }, { "name": "TypeScript", "bytes": "131931" } ], "symlink_target": "" }
'use strict'; module.exports = function (grunt) { grunt.initConfig({ clean: { build: 'build' }, requirejs: { // these defaults will be used as a base for every target we define options: { // the name is used to find js/amd/app.js, basically name: 'app', // this should be set to the path from your project root to the // root of your AMD JavaScript files. baseUrl: 'js/amd', // where we want the compilation result to go out: 'build/js/app.min.js' }, debug: { // These options also get merged with the defaults defined above options: { // for some reason, generating source maps requires this to be off // and it's on by default... preserveLicenseComments: false, // we want source maps because we're bundling everything together // learn more about source maps here: // http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/ generateSourceMaps: true, // also required by the generateSourceMaps option optimize: 'none' } }, // This target will inherit the default options, which is // enough for us. The defaults are tuned to optimize. release: {} } }); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-requirejs'); grunt.registerTask('build:debug', ['clean', 'requirejs:debug']); grunt.registerTask('build:release', ['clean', 'requirejs:release']); };
{ "content_hash": "4d986a90bef8b9b0af896784db64b55e", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 78, "avg_line_length": 29.358490566037737, "alnum_prop": 0.6111825192802056, "repo_name": "thalesmello/buildfirst", "id": "20747268efdffa66175fb1267c26bfc6660b7983", "size": "1556", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "ch05/10_requirejs-grunt/Gruntfile.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "9169" }, { "name": "HTML", "bytes": "33900" }, { "name": "Java", "bytes": "2410" }, { "name": "JavaScript", "bytes": "162761" }, { "name": "Shell", "bytes": "1528" }, { "name": "mupad", "bytes": "4226" } ], "symlink_target": "" }
package org.hisp.dhis.datastore; import static java.lang.Character.isLetterOrDigit; import static java.lang.Math.max; import static java.lang.Math.min; import static java.util.Arrays.stream; import static java.util.Collections.emptyList; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toSet; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; import lombok.ToString; import org.hisp.dhis.common.IllegalQueryException; import org.hisp.dhis.common.NamedParams; import org.hisp.dhis.feedback.ErrorCode; import org.hisp.dhis.feedback.ErrorMessage; /** * Details of a query as it can be performed to fetch {@link DatastoreEntry}s. * * @author Jan Bernitt */ @ToString @Getter @Builder( toBuilder = true ) @AllArgsConstructor( access = AccessLevel.PRIVATE ) public final class DatastoreQuery { /** * Filters allow values with {@code [a,b]} syntax where a comma occurs as * part of the value. These commas need to be ignored when splitting * parameter list. */ private static final String FILTER_SPLIT = ",(?![^\\[\\]]*\\]|[^\\(\\)]*\\))"; public static final Order KEY_ASC = new Order( "_", Direction.ASC ); private final String namespace; /** * By default, only entries which have at least one non-null value for the * extracted fields are returned. If all are included even matches with only * null values are included in the result list. */ private final boolean includeAll; private final boolean headless; /** * Use OR instead of AND between filters so that any match for one of the * filters is a match. Default false. */ private final boolean anyFilter; @Builder.Default private final boolean paging = true; @Builder.Default private final int page = 1; @Builder.Default private final int pageSize = 50; @Builder.Default private final List<Field> fields = emptyList(); @Builder.Default private final List<Filter> filters = emptyList(); @Builder.Default private final Order order = KEY_ASC; public enum Direction { ASC, DESC, NASC, NDESC; @Override public String toString() { return name().toLowerCase(); } public boolean isNumeric() { return this == NASC || this == NDESC; } } public interface HasPath { String getPath(); default boolean isKeyPath() { return getPath().equals( "_" ); } default boolean isValuePath() { return getPath().equals( "." ); } } @Getter public static final class Order implements HasPath { private final String path; private final Direction direction; public Order( String path, Direction direction ) { this.path = normalisePath( path ); this.direction = direction; } public static Order parse( String order ) { String[] parts = order.split( "(::|:|~|@)" ); if ( parts.length == 1 ) { return new Order( order, Direction.ASC ); } if ( parts.length == 2 ) { return new Order( parts[0], Direction.valueOf( parts[1].toUpperCase() ) ); } throw new IllegalArgumentException( "Not a valid order expression: " + order ); } @Override public String toString() { return path + ":" + direction; } } @Getter public static final class Field implements HasPath { private final String path; private final String alias; public Field( String path ) { this( path, null ); } public Field( String path, String alias ) { this.path = normalisePath( path ); this.alias = alias != null ? alias : ".".equals( path ) ? "value" : path; } @Override public String toString() { return alias == path ? path : path + "(" + alias + ")"; } } @Getter public static final class Filter implements HasPath { private final String path; private final Comparison operator; private final String value; public Filter( String path, Comparison operator, String value ) { this.path = normalisePath( path ); this.operator = operator; this.value = value; } @Override public String toString() { return value.isEmpty() ? path + ":" + operator : path + ":" + operator + ":" + value; } public boolean isNullValue() { return "null".equals( value ); } } public enum Comparison { // unary NULL( "null" ), NOT_NULL( "!null" ), EMPTY( "empty" ), NOT_EMPTY( "!empty" ), IN( "in" ), NOT_IN( "!in" ), // equality EQUAL( "eq" ), NOT_EQUAL( "!eq", "neq", "ne" ), // numeric or alphabetic LESS_THAN( "lt" ), LESS_THAN_OR_EQUAL( "lte", "le" ), GREATER_THAN( "gt" ), GREATER_THAN_OR_EQUAL( "gte", "ge" ), // case-sensitive pattern matching LIKE( "like" ), NOT_LIKE( "!like" ), STARTS_LIKE( "$like" ), NOT_STARTS_LIKE( "!$like" ), ENDS_LIKE( "like$" ), NOT_ENDS_LIKE( "!like$" ), // case-insensitive pattern matching IEQ( "ieq" ), ILIKE( "ilike" ), NOT_ILIKE( "!ilike" ), STARTS_WITH( "$ilike", "startswith" ), NOT_STARTS_WITH( "!$ilike", "!startswith" ), ENDS_WITH( "ilike$", "endswith" ), NOT_ENDS_WITH( "!ilike$", "!endswith" ); private Set<String> operators; Comparison( String... operators ) { this.operators = Set.of( operators ); } public boolean isUnary() { return ordinal() >= NULL.ordinal() && ordinal() <= NOT_EMPTY.ordinal(); } public boolean isCaseInsensitive() { return ordinal() >= IEQ.ordinal(); } public boolean isIn() { return this == IN || this == NOT_IN; } public boolean isTextBased() { return ordinal() >= LIKE.ordinal(); } public boolean isStartFlexible() { return isTextBased() && !Set.of( IEQ, STARTS_LIKE, STARTS_WITH, NOT_STARTS_LIKE, NOT_STARTS_WITH ) .contains( this ); } public boolean isEndFlexible() { return isTextBased() && !Set.of( IEQ, ENDS_LIKE, ENDS_WITH, NOT_ENDS_LIKE, NOT_ENDS_WITH ) .contains( this ); } public static Comparison parse( String operator ) { for ( Comparison c : values() ) { if ( c.operators.contains( operator.toLowerCase() ) ) { return c; } } throw new IllegalQueryException( "Unknown operator: `" + operator + "` Use one of " + stream( values() ) .flatMap( e -> e.operators.stream() ).collect( toSet() ) ); } @Override public String toString() { return operators.iterator().next(); } } public DatastoreQuery with( NamedParams params ) { int pageNo = max( 1, params.getInt( "page", 1 ) ); int size = max( 1, min( 1000, params.getInt( "pageSize", 50 ) ) ); boolean isPaging = params.getBoolean( "paging", true ); return toBuilder() .headless( params.getBoolean( "headless", false ) || !isPaging ) .anyFilter( params.getString( "rootJunction", "AND" ).equalsIgnoreCase( "OR" ) ) .order( Order.parse( params.getString( "order", KEY_ASC.path ) ) ) .paging( isPaging ) .page( pageNo ) .pageSize( size ) .filters( parseFilters( params.getStrings( "filter", FILTER_SPLIT ) ) ) .build(); } /** * Parses the fields URL parameter form to a list of {@link Field}s. * * In text form fields can describe nested fields in two forms: * * <pre> * root[child] * root[child1,child2] * root[level1[level2] * </pre> * * which is similar to the second form using dot * * <pre> * root.child * root.child1,root.child2 * root.level1.level2 * </pre> * * E leaf in this text form can be given an alias in round braces: * * <pre> * root(alias) * root[child(alias)] * </pre> * * @param fields a comma separated list of fields * @return the object form of the text representation given if valid * @throws IllegalQueryException in case the provided text form is not valid */ public static List<Field> parseFields( String fields ) { final List<Field> flat = new ArrayList<>(); final int len = fields.length(); String parentPath = ""; int start = 0; while ( start < len ) { int end = findNameEnd( fields, start ); String field = fields.substring( start, end ); start = end + 1; if ( end >= len ) { addNonEmptyTo( flat, parentPath, field ); return flat; } char next = fields.charAt( end ); if ( next == ',' ) { addNonEmptyTo( flat, parentPath, field ); } else if ( next == '[' || next == '(' ) { parentPath += field + "."; } else if ( next == ']' || next == ')' ) { addNonEmptyTo( flat, parentPath, field ); parentPath = parentPath.substring( 0, parentPath.lastIndexOf( '.', parentPath.length() - 2 ) + 1 ); } else { throw new IllegalQueryException( new ErrorMessage( ErrorCode.E7651, end, next ) ); } } return flat; } public static List<Filter> parseFilters( List<String> filterExpressions ) { Function<String, Filter> toFilter = expr -> { String[] parts = expr.split( "(::|:|~|@)" ); if ( parts.length < 2 ) { throw new IllegalQueryException( new ErrorMessage( ErrorCode.E7652, expr, "expected expression of pattern: <property>:<operator>[:<value>]" ) ); } String value = stream( parts ).skip( 2 ).collect( Collectors.joining( ":" ) ); return new Filter( parts[0], Comparison.parse( parts[1].toUpperCase() ), value ); }; return filterExpressions.stream().map( toFilter ).collect( toList() ); } /** * Adds a {@link Field} to the provided fields list of the leave field name * is not empty (which would indicate that we are not at the end of a new * field in the parsing process). * * @param fields list of fields to add to * @param parent parent path (might contain dotted segments) * @param field leaf path (no dotted segments) */ private static void addNonEmptyTo( List<Field> fields, String parent, String field ) { if ( !field.isEmpty() ) { int aliasStart = field.indexOf( "~hoist(" ); String name = aliasStart > 0 ? field.substring( 0, aliasStart ) : field; String alias = aliasStart > 0 ? field.substring( aliasStart + 7, field.length() - 1 ) : null; fields.add( new Field( parent + name, alias ) ); } } /** * @param fields search text * @param start start index in the search text * @return first index in the fields string that is not a valid name * character starting from the start position. */ private static int findNameEnd( String fields, int start ) { int pos = start; while ( pos < fields.length() && isNameCharacter( fields.charAt( pos ) ) ) { pos++; } return findAliasEnd( fields, pos ); } /** * @param fields search text * @param start start position in search text * @return first index in the fields string that is after a potential alias. * This assumes the start position must point to the start of an * alias or no alias is present. */ private static int findAliasEnd( String fields, int start ) { if ( start >= fields.length() || fields.charAt( start ) != '~' ) { return start; } return fields.indexOf( ')', start ) + 1; } private static boolean isNameCharacter( char c ) { return isLetterOrDigit( c ) || c == '.'; } /** * A valid path can have up to 5 levels each with an alphanumeric name * between 1 and 32 characters long and levels being separated by a dot. * <p> * The path needs to be protected since it becomes part of the SQL when the * path is extracted from the JSON values. Therefore, the limitations on the * path are quite strict even if this will not allow some corner case names * to be used that would be valid JSON member names. */ private static final String PATH_PATTERN = "^[-_a-zA-Z0-9]{1,32}(?:\\.[-_a-zA-Z0-9]{1,32}){0,5}$"; static String normalisePath( String path ) { if ( path == null ) { throw new IllegalQueryException( new ErrorMessage( ErrorCode.E7650, "(null)" ) ); } String normalised = path.replaceAll( "\\[(\\d+)]", ".$1" ); if ( !".".equals( path ) && !normalised.matches( PATH_PATTERN ) ) { throw new IllegalQueryException( new ErrorMessage( ErrorCode.E7650, path ) ); } return normalised; } }
{ "content_hash": "83249f0432806d732289a384649b2d5d", "timestamp": "", "source": "github", "line_count": 486, "max_line_length": 115, "avg_line_length": 29.652263374485596, "alnum_prop": 0.5430573867184789, "repo_name": "msf-oca-his/dhis2-core", "id": "f48f3514853b2dfa40d5557b6ba47ba42da25624", "size": "15967", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/datastore/DatastoreQuery.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "186517" }, { "name": "Dockerfile", "bytes": "2280" }, { "name": "HTML", "bytes": "69119" }, { "name": "Java", "bytes": "30867122" }, { "name": "JavaScript", "bytes": "958564" }, { "name": "PLpgSQL", "bytes": "60867" }, { "name": "Ruby", "bytes": "1011" }, { "name": "SCSS", "bytes": "4229" }, { "name": "Shell", "bytes": "21208" }, { "name": "XSLT", "bytes": "8451" } ], "symlink_target": "" }
@implementation KNJudgementTool + (BOOL)isEmptyString:(NSString *)string{ if(string == nil || string == NULL || [string isKindOfClass:[NSNull class]] || [[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] length]==0){ return YES; } return NO; } + (BOOL)isEmptyArray:(NSArray *)array{ if(array == nil || [array isKindOfClass:[NSNull class]] || array.count == 0){ return YES; } return NO; } @end
{ "content_hash": "e0f28722097143c5219f3ebfff82a95d", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 187, "avg_line_length": 28.058823529411764, "alnum_prop": 0.6624737945492662, "repo_name": "lifei321/CommonProject", "id": "58e62f59a9a04ffafb5cf4b073af391cced0a992", "size": "634", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "CommonProject/ChildController/BannerView/KNBannerView/KNJudgementTool.m", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "30544" }, { "name": "Objective-C", "bytes": "634311" } ], "symlink_target": "" }
<!-- Copyright (c) 2015 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt --> <link rel="import" href="../../bower_components/polymer/polymer.html"> <link rel="import" href="../../bower_components/neon-animation/neon-animation-runner-behavior.html"> <link rel="import" href="../../bower_components/neon-animation/animations/fade-out-animation.html"> <dom-module id="my-animatable3"> <template> <style> :host { display: inline-block; border-radius: 50%; width: 300px; height: 300px; background: orange; } </style> <content></content> </template> </dom-module> <script> Polymer({ is: 'my-animatable3', behaviors: [ Polymer.NeonAnimationRunnerBehavior ], properties: { animationConfig: { type: Object, value: function() { return { name: 'fade-out-animation', node: this } } } }, listeners: { 'neon-animation-finish': '_onNeonAnimationFinish' }, animate: function() { this.playAnimation(); }, _onNeonAnimationFinish: function() { console.log('animation finish!'); } }); </script>
{ "content_hash": "e3bdd60e6fc3f887dea71ddd8dfed448", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 100, "avg_line_length": 24.417910447761194, "alnum_prop": 0.6344743276283619, "repo_name": "jifalops/polymer-examples", "id": "5fea6cc47adffe3230c8b423bf377aa2f7a374e0", "size": "1636", "binary": false, "copies": "1", "ref": "refs/heads/dev", "path": "01_building-blocks/app/elements/animation-examples/my-animatable3.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "3110" }, { "name": "HTML", "bytes": "187078" }, { "name": "JavaScript", "bytes": "76960" }, { "name": "Shell", "bytes": "6948" } ], "symlink_target": "" }
<?php namespace Enhavo\Bundle\AppBundle\Maker; use Enhavo\Bundle\AppBundle\Util\NameTransformer; use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\HttpKernel\Bundle\BundleInterface; use Symfony\Component\HttpKernel\KernelInterface; use Symfony\Bundle\MakerBundle\InputConfiguration; use Symfony\Bundle\MakerBundle\Maker\AbstractMaker; use Symfony\Bundle\MakerBundle\ConsoleStyle; use Symfony\Bundle\MakerBundle\DependencyBuilder; use Symfony\Bundle\MakerBundle\Generator; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; class MakeWidget extends AbstractMaker { const TEMPLATE_FILE_PATH = 'Theme/Widget'; /** * @var KernelInterface */ private $kernel; /** * @var ConsoleOutputInterface */ private $output; /** * @var Generator */ private $util; /** * @var NameTransformer */ private $nameTransformer; /** * WidgetGenerator constructor. * * @param MakerUtil $util */ public function __construct(MakerUtil $util) { $this->util = $util; $this->nameTransformer = new NameTransformer(); } public function configureCommand(Command $command, InputConfiguration $inputConf) { $command ->setDescription('Creates a new widget') ->addArgument( 'bundleName', InputArgument::REQUIRED, 'What is the name of the bundle the new widget should be added to?' ) ->addArgument( 'widgetName', InputArgument::REQUIRED, 'What is the name the widget should have?' ); ; } public static function getCommandName(): string { return 'make:enhavo:widget'; } public function configureDependencies(DependencyBuilder $dependencies) { } public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator) { } public function generateWidget($bundleName, $widgetName) { $bundle = $this->kernel->getBundle($bundleName); $cleanedWidgetName = $this->cleanWidgetName($widgetName); $this->generateWidgetClassFile($bundle, $cleanedWidgetName); $this->generateTemplateFile($bundle, $cleanedWidgetName); $this->output->writeln(''); $this->output->writeln('<options=bold>Add this to your services.yaml config file:</>'); $this->output->writeln($this->generateServiceConfigCode($bundle, $cleanedWidgetName)); $this->output->writeln(''); $this->output->writeln('<options=bold>To render your widget, add this code in a twig file:</>'); $this->output->writeln('{{ widget_render(\'' . $this->nameTransformer->snakeCase($cleanedWidgetName) . '\', {}) }}'); $this->output->writeln(''); } private function generateWidgetClassFile(BundleInterface $bundle, $widgetName) { $filePath = $bundle->getPath() . '/Widget/' . $widgetName . 'Widget.php'; if (file_exists($filePath)) { throw new \RuntimeException('Class file "' . $filePath . '" already exists.'); } $this->util->renderFile( '@EnhavoGenerator/Generator/Widget/widget-class.php.twig', $filePath, [ 'namespace' => $bundle->getNamespace() . '\\Widget', 'template_file' => '@' . $this->util->getBundleNameWithoutPostfix($bundle) . '/' . self::TEMPLATE_FILE_PATH . '/' . $this->nameTransformer->snakeCase($widgetName) . '.html.twig', 'widget_name' => $widgetName, 'widget_label' => $this->nameTransformer->snakeCase($widgetName) ] ); } private function generateTemplateFile(BundleInterface $bundle, $widgetName) { $filePath = $bundle->getPath() . '/Resources/views/' . self::TEMPLATE_FILE_PATH . '/' . $this->nameTransformer->snakeCase($widgetName) . '.html.twig'; if (file_exists($filePath)) { throw new \RuntimeException('Template file "' . $filePath . '" already exists.'); } $this->util->renderFile( '@EnhavoGenerator/Generator/Widget/template.html.twig', $filePath, [ 'widget_name' => $widgetName ] ); } private function generateServiceConfigCode(BundleInterface $bundle, $widgetName) { return $this->util->render('@EnhavoGenerator/Generator/Widget/service_config_entry.yml.twig', array( 'bundle_name_snake_case_without_postfix' => $this->nameTransformer->snakeCase($this->util->getBundleNameWithoutPostfix($bundle)), 'widget_label' => $this->nameTransformer->snakeCase($widgetName), 'bundle_namespace' => $bundle->getNamespace(), 'widget_name' => $widgetName )); } private function cleanWidgetName($widgetName) { $cleanedWidgetName = $this->nameTransformer->snakeCase($widgetName); $matches = []; if (preg_match('/^(.+)Widget$/', $cleanedWidgetName, $matches)) { $cleanedWidgetName = $matches[1]; } return $cleanedWidgetName; } }
{ "content_hash": "c6baccdd48ccdd8bfcba61193eb65060", "timestamp": "", "source": "github", "line_count": 158, "max_line_length": 194, "avg_line_length": 33.61392405063291, "alnum_prop": 0.61890416117492, "repo_name": "enhavo/enhavo", "id": "a3e6400419214bddbda967aa283c3847afd5cad6", "size": "5311", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "src/Enhavo/Bundle/AppBundle/Maker/MakeWidget.php", "mode": "33188", "license": "mit", "language": [ { "name": "Gherkin", "bytes": "13222" }, { "name": "Handlebars", "bytes": "670" }, { "name": "JavaScript", "bytes": "123744" }, { "name": "PHP", "bytes": "3560247" }, { "name": "SCSS", "bytes": "91683" }, { "name": "Shell", "bytes": "1529" }, { "name": "Twig", "bytes": "173459" }, { "name": "TypeScript", "bytes": "386486" }, { "name": "Vue", "bytes": "114061" } ], "symlink_target": "" }
ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
{ "content_hash": "53048d372ab93a31d10677365b99cf40", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 31, "avg_line_length": 9.692307692307692, "alnum_prop": 0.7063492063492064, "repo_name": "mdoering/backbone", "id": "f1ae93b40c4a25aed010f2c96596e4b1a2732d9a", "size": "180", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Ericales/Ericaceae/Rhododendron/Rhododendron caeruleum/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
/** * @module gallery-editor-ui */ /** * @class EditorHTMLFormatter * @description Formats a DOM to correctly outlined easy to read HTML. */ var EditorHTMLFormatter = { html: [], indent: ' ', trimRe: /^\s+|\s+$/gi, inlineNodeRe: /^(img|br|sup|sub)$/i, newLineNodeRe: /^(div|p|img|blockquote|q|iframe|pre|code|table|tbody|th|td|tr|ul|ol|li|h1|h2|h3|h4|h5|h6|dl|dt|dd|form|fieldset|legend|iframe)$/i, notCloseNodesRe: /^(img|br)$/i, firstNodeRe: /^(<[^>]+>)/i, replaceNodesRe: /^(script|style|meta|body|head|title|link)/i, keepAttributesRe: /^(src|style|width|height|class|title|alt|data-)/i,//no id /* span, ul, b, strong, em, i, ul are all online */ /** * @method init * @description main render method * @param dom {Object} native DOM element or YUI Node * @return {String} HTML */ init: function(dom){ this.html = []; if(dom === null){ return '';//overwrites so maybe return dom }else if(dom && dom._node){ this._dive(dom.getDOMNode(),0);//for YUI }else{ this._dive(dom,0);//native DOM assumed } return this.html.join(''); }, /** * * @method _dive * @protected */ _dive: function (e,level) { var node = e.firstChild; if(!e) { return; } //go until no more child nodes while(node !== null) { //https://developer.mozilla.org/en-US/docs/DOM/Node.nodeType var hasTextChild = node.hasChildNodes() > 0 && node.firstChild.nodeType === 3 && node.firstChild.nodeValue.replace(this.trimRe,'').length > 0; if (node.nodeType === 1) { var nodeName = node.nodeName.toLowerCase(); //add all atributes //var node_str = node.outerHTML.replace(node.innerHTML,'').replace(this.trimRe, '');//works with new lines and stuff? //rebuild node var collection = node.attributes; var node_str = "<"+nodeName; for(var i=0; i<collection.length; i++){ node_str += " "+collection[i].name + "=\"" + collection[i].value+"\""; } node_str += ">"; /* node_match = node_str.match(this.firstNodeRe);//extract only first node if(node_match){ node_str = node_match[0]; } */ //only certain nodes get indent var new_line = '', indent_str = ''; if (nodeName.search(this.newLineNodeRe) === -1) { indent_str = ''; }else if(hasTextChild || !nodeName.search(this.inlineNodeRe) === -1){ //text node indent_str = ''+this._indenter(level); }else{//inline block new_line = '\n'; indent_str = ''+this._indenter(level); } this.html.push(indent_str+node_str); //if first child is not empty textnode, add new line if (!hasTextChild){ this.html.push(new_line); } this._dive(node,(level + 1)); }else if(node.nodeType === 3){ //text nodes (only non empty) if(node.nodeValue.replace(this.trimRe, '').length > 0) this.html.push(node.nodeValue); }else if(node.nodeType === 8){ this.html.push("<!-- "+node.nodeValue.replace(this.trimRe, '')+" -->\n");//comment node } if (node.nodeType === 1) { var nodeName = node.nodeName.toLowerCase(); //if to another level, close tag if (nodeName.search(this.notCloseNodesRe) === -1) { if (nodeName.search(this.newLineNodeRe) === -1) { this.html.push('</'+nodeName+'>'); //just close tag }else if(hasTextChild){ /* if has no childeren of main node, don't indent */ this.html.push('</'+nodeName+'>\n'); }else{ var indent_str = this._indenter(level); this.html.push(indent_str+'</'+nodeName+'>\n'); //new line node (block) end tag } } } //move to next node = node.nextSibling; } }, /** * * @method _indenter * @protected */ _indenter: function(level){ var indent_str = ''; for(var i=0; i < level; i++){ indent_str = indent_str + this.indent; } return indent_str; } }
{ "content_hash": "96108600db4d64177e77488367423cb7", "timestamp": "", "source": "github", "line_count": 135, "max_line_length": 148, "avg_line_length": 29.548148148148147, "alnum_prop": 0.5753321634494861, "repo_name": "jontsai/jekyll-theme-hacking-in-the-dark", "id": "9c2f9a886916cf507f0e6a9e665018933469df6b", "size": "3989", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "assets/themes/hacking-in-the-dark/lib/yui/gallery-2014.07.31-18-26/src/gallery-editor-ui/js/gallery-editor-formatter.js", "mode": "33188", "license": "mit", "language": [ { "name": "AngelScript", "bytes": "18806" }, { "name": "CSS", "bytes": "2272796" }, { "name": "HTML", "bytes": "12763270" }, { "name": "JavaScript", "bytes": "83857548" }, { "name": "Makefile", "bytes": "166" }, { "name": "PHP", "bytes": "153873" }, { "name": "Python", "bytes": "5709" }, { "name": "Shell", "bytes": "8699" }, { "name": "Yacc", "bytes": "4120" } ], "symlink_target": "" }
<?xml version='1.0'?> <test xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="int_maxExclusive001.xsd" > <!-- facet=maxExclusive and value=1 and document value=1 --> <foo>1</foo> </test>
{ "content_hash": "0553d0eca846aa24f6a7c80d4232e994", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 118, "avg_line_length": 45, "alnum_prop": 0.7111111111111111, "repo_name": "titellus/schematron", "id": "e21010259f341287416ebd52389f77340289d81b", "size": "225", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "xsd2sch/test/msData/datatypes/Facets/int/int_maxExclusive001.xml", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "2398" }, { "name": "Java", "bytes": "68299" }, { "name": "Red", "bytes": "9003" }, { "name": "Shell", "bytes": "593" }, { "name": "XProc", "bytes": "16202" }, { "name": "XSLT", "bytes": "1003199" } ], "symlink_target": "" }
package org.owasp.appsensor.ui.controller; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.web.csrf.CsrfToken; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; @Controller public class ViewsController { private static final String DETECTION_POINT_LABEL_DETAIL = "DETECTION_POINT_LABEL_DETAIL"; private static final String USERNAME_DETAIL = "USERNAME_DETAIL"; @RequestMapping(value="/about", method = RequestMethod.GET) public String about() { return "about"; } @PreAuthorize("hasAnyRole('VIEW_CONFIGURATION', 'EDIT_CONFIGURATION')") @RequestMapping(value="/configuration", method = RequestMethod.GET) public String configuration() { return "configuration"; } @PreAuthorize("hasAnyRole('VIEW_DATA')") @RequestMapping(value="/", method = RequestMethod.GET) public String dashboard() { return "dashboard"; } @PreAuthorize("hasAnyRole('VIEW_DATA')") @RequestMapping(value="/detection-points/{label}", method = RequestMethod.GET) public String detectionPoint(@PathVariable String label, Map<String, Object> model) { model.put(DETECTION_POINT_LABEL_DETAIL, label); return "detection-point"; } @PreAuthorize("hasAnyRole('VIEW_DATA')") @RequestMapping(value="/users/{username}", method = RequestMethod.GET) public String user(@PathVariable String username, Map<String, Object> model) { model.put(USERNAME_DETAIL, username); return "user"; } @PreAuthorize("hasAnyRole('VIEW_DATA')") @RequestMapping(value="/geo-map", method = RequestMethod.GET) public String geoMap() { return "geo-map"; } @PreAuthorize("hasAnyRole('VIEW_DATA')") @RequestMapping(value="/trends-dashboard", method = RequestMethod.GET) public String trendsDashboard() { return "trends-dashboard"; } @RequestMapping(value="/ping", method = RequestMethod.GET) @ResponseBody public boolean keepalive() { return true; } @RequestMapping("/login") public String login(Map<String, Object> model, HttpServletRequest request) { CsrfToken token = (CsrfToken) request.getAttribute("_csrf"); model.put("csrfTokenName", token.getParameterName()); model.put("csrfTokenValue", token.getToken()); parameterToModel("error", model, request); parameterToModel("logout", model, request); return "login"; } private void parameterToModel(String name, Map<String, Object> model, HttpServletRequest request) { if(request.getParameter(name) != null) { model.put(name, name); } } }
{ "content_hash": "fe62f3a3a19fd27461cb1a5b2c618e11", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 100, "avg_line_length": 31.382022471910112, "alnum_prop": 0.7508055853920516, "repo_name": "mahmoodm2/appsensor", "id": "03eebe294ee0f1267d13b520b0a7d3819a431495", "size": "2793", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "appsensor-ui/src/main/java/org/owasp/appsensor/ui/controller/ViewsController.java", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "299191" }, { "name": "HTML", "bytes": "400414" }, { "name": "Java", "bytes": "903022" }, { "name": "JavaScript", "bytes": "4974574" }, { "name": "Python", "bytes": "2875" }, { "name": "Ruby", "bytes": "20903" }, { "name": "Thrift", "bytes": "1916" } ], "symlink_target": "" }
Amortized variational inference with tensorflow.
{ "content_hash": "a7211bac1a54a4cce3ad79542019945b", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 48, "avg_line_length": 49, "alnum_prop": 0.8775510204081632, "repo_name": "andymiller/vae-flow", "id": "2f97a5b16ae7f350e53d44cbad4bac1c615261fd", "size": "60", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "Python", "bytes": "30585" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?android:listPreferredItemHeight" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?android:listPreferredItemHeight" android:gravity="center" android:orientation="horizontal" android:background="?android:selectableItemBackground" android:id="@+id/alternate_container_header" > <com.fsck.k9.ui.ContactBadge android:layout_width="42dp" android:layout_height="42dp" android:layout_marginLeft="12dp" android:layout_marginRight="12dp" android:id="@+id/alternate_contact_photo" tools:src="@drawable/ic_contact_picture" /> <LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:orientation="vertical"> <TextView android:id="@+id/alternate_header_name" android:textColor="?attr/textColorPrimaryRecipientDropdown" android:textAppearance="?android:attr/textAppearanceMedium" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dp" android:singleLine="true" android:ellipsize="end" tools:text="Mr. Firstname Lastname" /> <TextView android:id="@+id/alternate_header_label" android:textColor="?attr/textColorPrimaryRecipientDropdown" android:textAppearance="?android:attr/textAppearanceSmall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="6dp" android:singleLine="true" android:ellipsize="end" tools:text="Other" /> </LinearLayout> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margin="6dp" android:padding="8dp" android:id="@+id/alternate_remove" android:background="?android:selectableItemBackground" app:srcCompat="?attr/iconActionCancel" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?android:listPreferredItemHeight" android:gravity="center_vertical" android:orientation="horizontal" android:background="?android:selectableItemBackground" android:id="@+id/alternate_container_item" > <TextView android:id="@+id/alternate_address_label" android:textColor="?attr/textColorSecondaryRecipientDropdown" android:textAppearance="?android:attr/textAppearanceSmall" android:layout_width="60dp" android:layout_height="wrap_content" android:singleLine="true" android:gravity="center_horizontal" android:ellipsize="end" tools:text="Home" /> <TextView android:id="@+id/alternate_address" android:textColor="?attr/textColorSecondaryRecipientDropdown" android:textAppearance="?android:attr/textAppearanceSmall" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:paddingLeft="6dip" android:paddingRight="6dip" android:singleLine="true" android:ellipsize="end" tools:text="address@example.com" /> <FrameLayout android:id="@+id/alternate_crypto_status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="13dp" tools:visibility="gone"> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="start|center_vertical" app:srcCompat="@drawable/status_dots" app:tint="?attr/openpgp_grey" /> <ImageView android:id="@+id/alternate_crypto_status_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="start|center_vertical" tools:src="@drawable/status_lock_dots_2" tools:tint="?attr/openpgp_grey" /> </FrameLayout> <ImageView android:layout_width="16dp" android:layout_height="16dp" android:layout_gravity="center_vertical" android:layout_margin="13dp" android:id="@+id/alternate_crypto_status_simple" app:srcCompat="@drawable/status_lock" app:tint="?attr/openpgp_black" android:visibility="gone" tools:visibility="visible" /> </LinearLayout> </LinearLayout>
{ "content_hash": "f12b4cde1b81e7415ea622c8a949a3b7", "timestamp": "", "source": "github", "line_count": 148, "max_line_length": 75, "avg_line_length": 37.74324324324324, "alnum_prop": 0.5877192982456141, "repo_name": "k9mail/k-9", "id": "19d183f28714ac3ae37e7043c3c180100c0b7620", "size": "5586", "binary": false, "copies": "2", "ref": "refs/heads/main", "path": "app/ui/legacy/src/main/res/layout/recipient_alternate_item.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AIDL", "bytes": "1946" }, { "name": "Java", "bytes": "2674232" }, { "name": "Kotlin", "bytes": "2513076" }, { "name": "Shell", "bytes": "3268" } ], "symlink_target": "" }
package flatMapping; import one.util.streamex.DoubleStreamEx; import java.util.stream.IntStream; public class FlatMapToInt { public static void main(String[] args) { // Breakpoint! final int sum = DoubleStreamEx.of(1, 2, 3).flatMapToInt(x -> IntStream.of(1, 3)).sum(); System.out.println(sum); } }
{ "content_hash": "5b1f4c4582c398de4329e6feb57a4460", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 91, "avg_line_length": 24.384615384615383, "alnum_prop": 0.7034700315457413, "repo_name": "jk1/intellij-community", "id": "dad101d3870752bc30d8dc2fe72064544c0cb86f", "size": "317", "binary": false, "copies": "24", "ref": "refs/heads/master", "path": "plugins/stream-debugger/testData/streamex/src/flatMapping/FlatMapToInt.java", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>python.sparknlp.annotator.classifier_dl.longformer_for_token_classification &#8212; Spark NLP 4.2.3 documentation</title> <script> document.documentElement.dataset.mode = localStorage.getItem("mode") || ""; document.documentElement.dataset.theme = localStorage.getItem("theme") || "light"; </script> <!-- Loaded before other Sphinx assets --> <link href="../../../../../static/styles/theme.css?digest=1e1de1a1873e13ef5536" rel="stylesheet"> <link href="../../../../../static/styles/pydata-sphinx-theme.css?digest=1e1de1a1873e13ef5536" rel="stylesheet"> <link rel="stylesheet" href="../../../../../static/vendor/fontawesome/6.1.2/css/all.min.css"> <link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../static/vendor/fontawesome/6.1.2/webfonts/fa-solid-900.woff2"> <link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../static/vendor/fontawesome/6.1.2/webfonts/fa-brands-400.woff2"> <link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../../static/vendor/fontawesome/6.1.2/webfonts/fa-regular-400.woff2"> <link rel="stylesheet" type="text/css" href="../../../../../static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../../../../../static/graphviz.css" /> <link rel="stylesheet" type="text/css" href="../../../../../static/css/custom.css" /> <!-- Pre-loaded scripts that we'll load fully later --> <link rel="preload" as="script" href="../../../../../static/scripts/pydata-sphinx-theme.js?digest=1e1de1a1873e13ef5536"> <script data-url_root="../../../../../" id="documentation_options" src="../../../../../static/documentation_options.js"></script> <script src="../../../../../static/jquery.js"></script> <script src="../../../../../static/underscore.js"></script> <script src="../../../../../static/_sphinx_javascript_frameworks_compat.js"></script> <script src="../../../../../static/doctools.js"></script> <script src="../../../../../static/sphinx_highlight.js"></script> <script src="../../../../../static/toggleprompt.js"></script> <script>DOCUMENTATION_OPTIONS.pagename = 'modules/python/sparknlp/annotator/classifier_dl/longformer_for_token_classification';</script> <link rel="shortcut icon" href="../../../../../static/fav.ico"/> <link rel="index" title="Index" href="../../../../../genindex.html" /> <link rel="search" title="Search" href="../../../../../search.html" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="docsearch:language" content="en"> </head> <body data-spy="scroll" data-target="#bd-toc-nav" data-offset="180" data-default-mode=""> <input type="checkbox" class="sidebar-toggle" name="__primary" id="__primary"> <label class="overlay overlay-primary" for="__primary"></label> <input type="checkbox" class="sidebar-toggle" name="__secondary" id="__secondary"> <label class="overlay overlay-secondary" for="__secondary"></label> <div class="search-button__wrapper"> <div class="search-button__overlay"></div> <div class="search-button__search-container"> <form class="bd-search d-flex align-items-center" action="../../../../../search.html" method="get"> <i class="fa-solid fa-magnifying-glass"></i> <input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"> <span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span> </form> </div> </div> <nav class="bd-header navbar navbar-expand-lg bd-navbar" id="navbar-main"><div class="bd-header__inner bd-page-width"> <label class="sidebar-toggle primary-toggle" for="__primary"> <span class="fa-solid fa-bars"></span> </label> <div id="navbar-start"> <a class="navbar-brand logo" href="../../../../../index.html"> <img src="../../../../../static/logo.png" class="logo__image only-light" alt="Logo image"> <img src="../../../../../static/logo.png" class="logo__image only-dark" alt="Logo image"> </a> </div> <div class="col-lg-9 navbar-header-items"> <div id="navbar-center" class="mr-auto"> <div class="navbar-center-item"> <nav class="navbar-nav"> <p class="sidebar-header-items__title" role="heading" aria-level="1" aria-label="Site Navigation"> Site Navigation </p> <ul id="navbar-main-elements" class="navbar-nav"> <li class="nav-item"> <a class="nav-link" href="../../../../../getting_started/index.html"> Getting Started </a> </li> <li class="nav-item"> <a class="nav-link" href="../../../../../user_guide/index.html"> User Guide </a> </li> <li class="nav-item"> <a class="nav-link" href="../../../../../third_party/index.html"> Third Party Projects </a> </li> <li class="nav-item"> <a class="nav-link" href="../../../../../reference/index.html"> API Reference </a> </li> </ul> </nav> </div> </div> <div id="navbar-end"> <div class="navbar-end-item navbar-end__search-button-container"> <button class="btn btn-sm navbar-btn search-button search-button__button" title="Search" data-toggle="tooltip"> <i class="fa-solid fa-magnifying-glass"></i> </button> </div> <div class="navbar-end-item"> <span class="theme-switch-button btn btn-sm btn-outline-primary navbar-btn rounded-circle" title="light/dark" data-toggle="tooltip"> <a class="theme-switch" data-mode="light"><i class="fa-solid fa-sun"></i></a> <a class="theme-switch" data-mode="dark"><i class="fa-regular fa-moon"></i></a> <a class="theme-switch" data-mode="auto"><i class="fa-solid fa-circle-half-stroke"></i></a> </span> </div> <div class="navbar-end-item"> <ul id="navbar-icon-links" class="navbar-nav" aria-label="Icon Links"> </ul> </div> </div> </div> <div class="search-button-container--mobile"> <button class="btn btn-sm navbar-btn search-button search-button__button" title="Search" data-toggle="tooltip"> <i class="fa-solid fa-magnifying-glass"></i> </button> </div> <label class="sidebar-toggle secondary-toggle" for="__secondary"> <span class="fa-solid fa-outdent"></span> </label> </div> </nav> <div class="bd-container"> <div class="bd-container__inner bd-page-width"> <div class="bd-sidebar-primary bd-sidebar hide-on-wide"> <div class="sidebar-header-items sidebar-primary__section"> <div class="sidebar-header-items__center"> <div class="navbar-center-item"> <nav class="navbar-nav"> <p class="sidebar-header-items__title" role="heading" aria-level="1" aria-label="Site Navigation"> Site Navigation </p> <ul id="navbar-main-elements" class="navbar-nav"> <li class="nav-item"> <a class="nav-link" href="../../../../../getting_started/index.html"> Getting Started </a> </li> <li class="nav-item"> <a class="nav-link" href="../../../../../user_guide/index.html"> User Guide </a> </li> <li class="nav-item"> <a class="nav-link" href="../../../../../third_party/index.html"> Third Party Projects </a> </li> <li class="nav-item"> <a class="nav-link" href="../../../../../reference/index.html"> API Reference </a> </li> </ul> </nav> </div> </div> <div class="sidebar-header-items__end"> <div class="navbar-end-item"> <span class="theme-switch-button btn btn-sm btn-outline-primary navbar-btn rounded-circle" title="light/dark" data-toggle="tooltip"> <a class="theme-switch" data-mode="light"><i class="fa-solid fa-sun"></i></a> <a class="theme-switch" data-mode="dark"><i class="fa-regular fa-moon"></i></a> <a class="theme-switch" data-mode="auto"><i class="fa-solid fa-circle-half-stroke"></i></a> </span> </div> <div class="navbar-end-item"> <ul id="navbar-icon-links" class="navbar-nav" aria-label="Icon Links"> </ul> </div> </div> </div> <div class="sidebar-end-items sidebar-primary__section"> <div class="sidebar-end-items__item"> </div> </div> </div> <main class="bd-main"> <div class="bd-content"> <div class="bd-article-container"> <div class="bd-header-article"> </div> <article class="bd-article" role="main"> <h1>Source code for python.sparknlp.annotator.classifier_dl.longformer_for_token_classification</h1><div class="highlight"><pre> <span></span><span class="c1"># Copyright 2017-2022 John Snow Labs</span> <span class="c1">#</span> <span class="c1"># Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span> <span class="c1"># you may not use this file except in compliance with the License.</span> <span class="c1"># You may obtain a copy of the License at</span> <span class="c1">#</span> <span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span> <span class="c1">#</span> <span class="c1"># Unless required by applicable law or agreed to in writing, software</span> <span class="c1"># distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span> <span class="c1"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> <span class="c1"># See the License for the specific language governing permissions and</span> <span class="c1"># limitations under the License.</span> <span class="sd">&quot;&quot;&quot;Contains classes for LongformerForTokenClassification.&quot;&quot;&quot;</span> <span class="kn">from</span> <span class="nn">sparknlp.common</span> <span class="kn">import</span> <span class="o">*</span> <span class="kn">from</span> <span class="nn">sparknlp.common.annotator_type</span> <span class="kn">import</span> <span class="n">AnnotatorType</span> <div class="viewcode-block" id="LongformerForTokenClassification"><a class="viewcode-back" href="../../../../../reference/autosummary/python/sparknlp/annotator/classifier_dl/longformer_for_token_classification/index.html#python.sparknlp.annotator.classifier_dl.longformer_for_token_classification.LongformerForTokenClassification">[docs]</a><span class="k">class</span> <span class="nc">LongformerForTokenClassification</span><span class="p">(</span><span class="n">AnnotatorModel</span><span class="p">,</span> <span class="n">HasCaseSensitiveProperties</span><span class="p">,</span> <span class="n">HasBatchedAnnotate</span><span class="p">,</span> <span class="n">HasEngine</span><span class="p">):</span> <span class="sd">&quot;&quot;&quot;LongformerForTokenClassification can load Longformer Models with a token</span> <span class="sd"> classification head on top (a linear layer on top of the hidden-states</span> <span class="sd"> output) e.g. for Named-Entity-Recognition (NER) tasks.</span> <span class="sd"> Pretrained models can be loaded with :meth:`.pretrained` of the companion</span> <span class="sd"> object:</span> <span class="sd"> &gt;&gt;&gt; token_classifier = LongformerForTokenClassification.pretrained() \\</span> <span class="sd"> ... .setInputCols([&quot;token&quot;, &quot;document&quot;]) \\</span> <span class="sd"> ... .setOutputCol(&quot;label&quot;)</span> <span class="sd"> The default model is ``&quot;xlnet_base_token_classifier_conll03&quot;``, if no name is</span> <span class="sd"> provided.</span> <span class="sd"> For available pretrained models please see the `Models Hub</span> <span class="sd"> &lt;https://nlp.johnsnowlabs.com/models?task=Named+Entity+Recognition&gt;`__.</span> <span class="sd"> To see which models are compatible and how to import them see</span> <span class="sd"> `Import Transformers into Spark NLP 🚀</span> <span class="sd"> &lt;https://github.com/JohnSnowLabs/spark-nlp/discussions/5669&gt;`_.</span> <span class="sd"> ====================== ======================</span> <span class="sd"> Input Annotation types Output Annotation type</span> <span class="sd"> ====================== ======================</span> <span class="sd"> ``DOCUMENT, TOKEN`` ``NAMED_ENTITY``</span> <span class="sd"> ====================== ======================</span> <span class="sd"> Parameters</span> <span class="sd"> ----------</span> <span class="sd"> batchSize</span> <span class="sd"> Batch size. Large values allows faster processing but requires more</span> <span class="sd"> memory, by default 8</span> <span class="sd"> caseSensitive</span> <span class="sd"> Whether to ignore case in tokens for embeddings matching, by default</span> <span class="sd"> True</span> <span class="sd"> configProtoBytes</span> <span class="sd"> ConfigProto from tensorflow, serialized into byte array.</span> <span class="sd"> maxSentenceLength</span> <span class="sd"> Max sentence length to process, by default 128</span> <span class="sd"> Examples</span> <span class="sd"> --------</span> <span class="sd"> &gt;&gt;&gt; import sparknlp</span> <span class="sd"> &gt;&gt;&gt; from sparknlp.base import *</span> <span class="sd"> &gt;&gt;&gt; from sparknlp.annotator import *</span> <span class="sd"> &gt;&gt;&gt; from pyspark.ml import Pipeline</span> <span class="sd"> &gt;&gt;&gt; documentAssembler = DocumentAssembler() \\</span> <span class="sd"> ... .setInputCol(&quot;text&quot;) \\</span> <span class="sd"> ... .setOutputCol(&quot;document&quot;)</span> <span class="sd"> &gt;&gt;&gt; tokenizer = Tokenizer() \\</span> <span class="sd"> ... .setInputCols([&quot;document&quot;]) \\</span> <span class="sd"> ... .setOutputCol(&quot;token&quot;)</span> <span class="sd"> &gt;&gt;&gt; tokenClassifier = LongformerForTokenClassification.pretrained() \\</span> <span class="sd"> ... .setInputCols([&quot;token&quot;, &quot;document&quot;]) \\</span> <span class="sd"> ... .setOutputCol(&quot;label&quot;) \\</span> <span class="sd"> ... .setCaseSensitive(True)</span> <span class="sd"> &gt;&gt;&gt; pipeline = Pipeline().setStages([</span> <span class="sd"> ... documentAssembler,</span> <span class="sd"> ... tokenizer,</span> <span class="sd"> ... tokenClassifier</span> <span class="sd"> ... ])</span> <span class="sd"> &gt;&gt;&gt; data = spark.createDataFrame([[&quot;John Lenon was born in London and lived in Paris. My name is Sarah and I live in London&quot;]]).toDF(&quot;text&quot;)</span> <span class="sd"> &gt;&gt;&gt; result = pipeline.fit(data).transform(data)</span> <span class="sd"> &gt;&gt;&gt; result.select(&quot;label.result&quot;).show(truncate=False)</span> <span class="sd"> +------------------------------------------------------------------------------------+</span> <span class="sd"> |result |</span> <span class="sd"> +------------------------------------------------------------------------------------+</span> <span class="sd"> |[B-PER, I-PER, O, O, O, B-LOC, O, O, O, B-LOC, O, O, O, O, B-PER, O, O, O, O, B-LOC]|</span> <span class="sd"> +------------------------------------------------------------------------------------+</span> <span class="sd"> &quot;&quot;&quot;</span> <span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;LongformerForTokenClassification&quot;</span> <span class="n">inputAnnotatorTypes</span> <span class="o">=</span> <span class="p">[</span><span class="n">AnnotatorType</span><span class="o">.</span><span class="n">DOCUMENT</span><span class="p">,</span> <span class="n">AnnotatorType</span><span class="o">.</span><span class="n">TOKEN</span><span class="p">]</span> <span class="n">maxSentenceLength</span> <span class="o">=</span> <span class="n">Param</span><span class="p">(</span><span class="n">Params</span><span class="o">.</span><span class="n">_dummy</span><span class="p">(),</span> <span class="s2">&quot;maxSentenceLength&quot;</span><span class="p">,</span> <span class="s2">&quot;Max sentence length to process&quot;</span><span class="p">,</span> <span class="n">typeConverter</span><span class="o">=</span><span class="n">TypeConverters</span><span class="o">.</span><span class="n">toInt</span><span class="p">)</span> <span class="n">configProtoBytes</span> <span class="o">=</span> <span class="n">Param</span><span class="p">(</span><span class="n">Params</span><span class="o">.</span><span class="n">_dummy</span><span class="p">(),</span> <span class="s2">&quot;configProtoBytes&quot;</span><span class="p">,</span> <span class="s2">&quot;ConfigProto from tensorflow, serialized into byte array. Get with config_proto.SerializeToString()&quot;</span><span class="p">,</span> <span class="n">TypeConverters</span><span class="o">.</span><span class="n">toListInt</span><span class="p">)</span> <div class="viewcode-block" id="LongformerForTokenClassification.getClasses"><a class="viewcode-back" href="../../../../../reference/autosummary/python/sparknlp/annotator/classifier_dl/longformer_for_token_classification/index.html#python.sparknlp.annotator.classifier_dl.longformer_for_token_classification.LongformerForTokenClassification.getClasses">[docs]</a> <span class="k">def</span> <span class="nf">getClasses</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="sd">&quot;&quot;&quot;</span> <span class="sd"> Returns labels used to train this model</span> <span class="sd"> &quot;&quot;&quot;</span> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_call_java</span><span class="p">(</span><span class="s2">&quot;getClasses&quot;</span><span class="p">)</span></div> <div class="viewcode-block" id="LongformerForTokenClassification.setConfigProtoBytes"><a class="viewcode-back" href="../../../../../reference/autosummary/python/sparknlp/annotator/classifier_dl/longformer_for_token_classification/index.html#python.sparknlp.annotator.classifier_dl.longformer_for_token_classification.LongformerForTokenClassification.setConfigProtoBytes">[docs]</a> <span class="k">def</span> <span class="nf">setConfigProtoBytes</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">b</span><span class="p">):</span> <span class="sd">&quot;&quot;&quot;Sets configProto from tensorflow, serialized into byte array.</span> <span class="sd"> Parameters</span> <span class="sd"> ----------</span> <span class="sd"> b : List[int]</span> <span class="sd"> ConfigProto from tensorflow, serialized into byte array</span> <span class="sd"> &quot;&quot;&quot;</span> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_set</span><span class="p">(</span><span class="n">configProtoBytes</span><span class="o">=</span><span class="n">b</span><span class="p">)</span></div> <div class="viewcode-block" id="LongformerForTokenClassification.setMaxSentenceLength"><a class="viewcode-back" href="../../../../../reference/autosummary/python/sparknlp/annotator/classifier_dl/longformer_for_token_classification/index.html#python.sparknlp.annotator.classifier_dl.longformer_for_token_classification.LongformerForTokenClassification.setMaxSentenceLength">[docs]</a> <span class="k">def</span> <span class="nf">setMaxSentenceLength</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span> <span class="sd">&quot;&quot;&quot;Sets max sentence length to process, by default 128.</span> <span class="sd"> Parameters</span> <span class="sd"> ----------</span> <span class="sd"> value : int</span> <span class="sd"> Max sentence length to process</span> <span class="sd"> &quot;&quot;&quot;</span> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_set</span><span class="p">(</span><span class="n">maxSentenceLength</span><span class="o">=</span><span class="n">value</span><span class="p">)</span></div> <span class="nd">@keyword_only</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">classname</span><span class="o">=</span><span class="s2">&quot;com.johnsnowlabs.nlp.annotators.classifier.dl.LongformerForTokenClassification&quot;</span><span class="p">,</span> <span class="n">java_model</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span> <span class="nb">super</span><span class="p">(</span><span class="n">LongformerForTokenClassification</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span> <span class="n">classname</span><span class="o">=</span><span class="n">classname</span><span class="p">,</span> <span class="n">java_model</span><span class="o">=</span><span class="n">java_model</span> <span class="p">)</span> <span class="bp">self</span><span class="o">.</span><span class="n">_setDefault</span><span class="p">(</span> <span class="n">batchSize</span><span class="o">=</span><span class="mi">8</span><span class="p">,</span> <span class="n">maxSentenceLength</span><span class="o">=</span><span class="mi">128</span><span class="p">,</span> <span class="n">caseSensitive</span><span class="o">=</span><span class="kc">True</span> <span class="p">)</span> <span class="nd">@staticmethod</span> <div class="viewcode-block" id="LongformerForTokenClassification.loadSavedModel"><a class="viewcode-back" href="../../../../../reference/autosummary/python/sparknlp/annotator/classifier_dl/longformer_for_token_classification/index.html#python.sparknlp.annotator.classifier_dl.longformer_for_token_classification.LongformerForTokenClassification.loadSavedModel">[docs]</a> <span class="k">def</span> <span class="nf">loadSavedModel</span><span class="p">(</span><span class="n">folder</span><span class="p">,</span> <span class="n">spark_session</span><span class="p">):</span> <span class="sd">&quot;&quot;&quot;Loads a locally saved model.</span> <span class="sd"> Parameters</span> <span class="sd"> ----------</span> <span class="sd"> folder : str</span> <span class="sd"> Folder of the saved model</span> <span class="sd"> spark_session : pyspark.sql.SparkSession</span> <span class="sd"> The current SparkSession</span> <span class="sd"> Returns</span> <span class="sd"> -------</span> <span class="sd"> LongformerForTokenClassification</span> <span class="sd"> The restored model</span> <span class="sd"> &quot;&quot;&quot;</span> <span class="kn">from</span> <span class="nn">sparknlp.internal</span> <span class="kn">import</span> <span class="n">_LongformerTokenClassifierLoader</span> <span class="n">jModel</span> <span class="o">=</span> <span class="n">_LongformerTokenClassifierLoader</span><span class="p">(</span><span class="n">folder</span><span class="p">,</span> <span class="n">spark_session</span><span class="o">.</span><span class="n">_jsparkSession</span><span class="p">)</span><span class="o">.</span><span class="n">_java_obj</span> <span class="k">return</span> <span class="n">LongformerForTokenClassification</span><span class="p">(</span><span class="n">java_model</span><span class="o">=</span><span class="n">jModel</span><span class="p">)</span></div> <span class="nd">@staticmethod</span> <div class="viewcode-block" id="LongformerForTokenClassification.pretrained"><a class="viewcode-back" href="../../../../../reference/autosummary/python/sparknlp/annotator/classifier_dl/longformer_for_token_classification/index.html#python.sparknlp.annotator.classifier_dl.longformer_for_token_classification.LongformerForTokenClassification.pretrained">[docs]</a> <span class="k">def</span> <span class="nf">pretrained</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s2">&quot;longformer_base_token_classifier_conll03&quot;</span><span class="p">,</span> <span class="n">lang</span><span class="o">=</span><span class="s2">&quot;en&quot;</span><span class="p">,</span> <span class="n">remote_loc</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span> <span class="sd">&quot;&quot;&quot;Downloads and loads a pretrained model.</span> <span class="sd"> Parameters</span> <span class="sd"> ----------</span> <span class="sd"> name : str, optional</span> <span class="sd"> Name of the pretrained model, by default</span> <span class="sd"> &quot;longformer_base_token_classifier_conll03&quot;</span> <span class="sd"> lang : str, optional</span> <span class="sd"> Language of the pretrained model, by default &quot;en&quot;</span> <span class="sd"> remote_loc : str, optional</span> <span class="sd"> Optional remote address of the resource, by default None. Will use</span> <span class="sd"> Spark NLPs repositories otherwise.</span> <span class="sd"> Returns</span> <span class="sd"> -------</span> <span class="sd"> LongformerForTokenClassification</span> <span class="sd"> The restored model</span> <span class="sd"> &quot;&quot;&quot;</span> <span class="kn">from</span> <span class="nn">sparknlp.pretrained</span> <span class="kn">import</span> <span class="n">ResourceDownloader</span> <span class="k">return</span> <span class="n">ResourceDownloader</span><span class="o">.</span><span class="n">downloadModel</span><span class="p">(</span><span class="n">LongformerForTokenClassification</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">lang</span><span class="p">,</span> <span class="n">remote_loc</span><span class="p">)</span></div></div> </pre></div> </article> <footer class="bd-footer-article"> <!-- Previous / next buttons --> <div class='prev-next-area'> </div> </footer> </div> <div class="bd-sidebar-secondary bd-toc"> <div class="toc-item"> <div id="searchbox"></div> </div> <div class="toc-item"> </div> <div class="toc-item"> </div> </div> </div> <footer class="bd-footer-content"> <div class="bd-footer-content__inner"> </div> </footer> </main> </div> </div> <!-- Scripts loaded after <body> so the DOM is not blocked --> <script src="../../../../../static/scripts/pydata-sphinx-theme.js?digest=1e1de1a1873e13ef5536"></script> <footer class="bd-footer"><div class="bd-footer__inner container"> <div class="footer-item"> <p class="copyright"> &copy; Copyright 2022, John Snow Labs.<br> </p> </div> <div class="footer-item"> <p class="sphinx-version"> Created using <a href="http://sphinx-doc.org/">Sphinx</a> 5.3.0.<br> </p> </div> </div> </footer> </body> </html>
{ "content_hash": "6c3faa4731638a01c73e1e1289f8bf22", "timestamp": "", "source": "github", "line_count": 547, "max_line_length": 828, "avg_line_length": 53.61243144424132, "alnum_prop": 0.5972515856236786, "repo_name": "JohnSnowLabs/spark-nlp", "id": "77e403508be342e75ece6cb3d58cdb5fcf43f478", "size": "29330", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/api/python/modules/python/sparknlp/annotator/classifier_dl/longformer_for_token_classification.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "14452" }, { "name": "Java", "bytes": "223289" }, { "name": "Makefile", "bytes": "819" }, { "name": "Python", "bytes": "1694517" }, { "name": "Scala", "bytes": "4116435" }, { "name": "Shell", "bytes": "5286" } ], "symlink_target": "" }
package com.github.chrisblutz.trinity.lang.procedures; import com.github.chrisblutz.trinity.lang.errors.Errors; /** * @author Christopher Lutz */ public class DefaultProcedures { public static ProcedureAction getDefaultUOEOperationProcedure(String operation) { return (runtime, thisObj, params) -> { Errors.throwError(Errors.Classes.UNSUPPORTED_OPERATION_ERROR, runtime, "Operation '" + operation + "' not supported."); return thisObj; }; } }
{ "content_hash": "f5e1e109568cf9c1bcc4b712f58e3d86", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 131, "avg_line_length": 26.8, "alnum_prop": 0.6473880597014925, "repo_name": "chrisblutz/TrinityLang", "id": "69dd5c3fedd5cf2c5833044b7c2c9ceada011d4a", "size": "536", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/github/chrisblutz/trinity/lang/procedures/DefaultProcedures.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "319272" } ], "symlink_target": "" }
<!doctype html> <!-- @license Copyright (c) 2015 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt --> <html> <head> <meta charset="UTF-8"> <title>paper-drawer-panel tests</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> <script src="../../webcomponentsjs/webcomponents-lite.js"></script> <script src="../../web-component-tester/browser.js"></script> <link rel="import" href="../paper-drawer-panel.html"> <link rel="import" href="../../iron-test-helpers/iron-test-helpers.html"> </head> <style> body { margin: 0; padding: 0; } body { margin: 0; padding: 0; } </style> <body> <test-fixture id="drawer"> <template> <paper-drawer-panel force-narrow> <div slot="drawer"> <input id="innerLink1" tabindex="0" value="inside drawer 1"> <input id="innerLink2" tabindex="0" value="inside drawer 2"> </div> <div slot="main"> <input id="outerLink" tabindex="0" value="outside drawer"> </div> </paper-drawer-panel> </template> </test-fixture> <test-fixture id="nestedDrawer"> <template> <paper-drawer-panel force-narrow> <div slot="drawer"> <input id="innerLink1" tabindex="0" value="inside drawer 1"> </div> <paper-drawer-panel slot="main" id="drawer2" force-narrow> <div slot="drawer"> <input id="innerLink2" tabindex="0" value="inside drawer 2"> </div> <div slot="main"> <input id="outerLink" tabindex="0" value="outside drawer"> </div> </paper-drawer-panel> </paper-drawer-panel> </template> </test-fixture> <script> function ensureDocumentHasFocus() { window.top && window.top.focus(); } suite('focus', function() { var drawer, innerLink, outerLink; setup(function() { drawer = fixture('drawer'); innerLink = drawer.querySelector('#innerLink1'); outerLink = drawer.querySelector('#outerLink'); ensureDocumentHasFocus(); }); test( 'should not focus content in drawer if the drawer is closed', function(done) { Polymer.Base.async(function() { expect(Polymer.dom(document).activeElement) .to.not.be.equal(innerLink); done(); }, 1); MockInteractions.focus(innerLink); }); }); suite('nested drawers', function() { var drawer1, drawer2, innerLink1, innerLink2; setup(function() { drawer1 = fixture('nestedDrawer'); ensureDocumentHasFocus(); }); test('stack should not overflow', function(done) { flush(function() { var count = 0; var drawer2 = document.querySelector('#drawer2'); var innerLink1 = document.querySelector('#innerLink1'); var innerLink2 = document.querySelector('#innerLink2'); var spy = sinon.spy(); drawer1.openDrawer(); drawer2.openDrawer(); document.addEventListener('focus', spy, true); MockInteractions.focus(innerLink1); MockInteractions.focus(innerLink2); Polymer.Base.async(function() { if (spy.callCount > 10) { throw new Error('stack overflow'); } done(); }, 100); }); }); }); </script> </body> </html>
{ "content_hash": "7e8f7f5d51cf307318a645a4deb8cb3f", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 100, "avg_line_length": 29.862595419847327, "alnum_prop": 0.5904907975460123, "repo_name": "ms123s/simpl4-src", "id": "c7307e674b06b7af848184ae92c1da5a4f6e8cd2", "size": "3912", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "surface2/domelements/bower_components/paper-drawer-panel/test/focus.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "3887" }, { "name": "CSS", "bytes": "735606" }, { "name": "Groovy", "bytes": "512961" }, { "name": "HTML", "bytes": "3285460" }, { "name": "Java", "bytes": "4169538" }, { "name": "JavaScript", "bytes": "33927529" }, { "name": "Python", "bytes": "14350" }, { "name": "Shell", "bytes": "72131" }, { "name": "Smarty", "bytes": "19765" }, { "name": "XSLT", "bytes": "579304" } ], "symlink_target": "" }
"""The fsl module provides classes for interfacing with the `FSL <http://www.fmrib.ox.ac.uk/fsl/index.html>`_ command line tools. This was written to work with FSL version 4.1.4. Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data')) >>> os.chdir(datadir) """ import os,shutil import warnings from nipype.interfaces.fsl.base import FSLCommand, FSLCommandInputSpec from nipype.interfaces.base import Bunch, TraitedSpec, isdefined, File,Directory,\ InputMultiPath import enthought.traits.api as traits warn = warnings.warn warnings.filterwarnings('always', category=UserWarning) class DTIFitInputSpec(FSLCommandInputSpec): dwi = File(exists=True, desc = 'diffusion weighted image data file', argstr='-k %s', position=0, mandatory=True) base_name = traits.Str("dtifit_", desc = 'base_name that all output files will start with', argstr='-o %s', position=1, usedefault=True) mask = File(exists=True, desc = 'bet binary mask file', argstr='-m %s', position=2, mandatory=True) bvecs = File(exists=True, desc = 'b vectors file', argstr='-r %s', position=3, mandatory=True) bvals = File(exists=True,desc = 'b values file', argstr='-b %s', position=4, mandatory=True) min_z = traits.Int(argstr='-z %d', desc='min z') max_z = traits.Int(argstr='-Z %d', desc='max z') min_y = traits.Int(argstr='-y %d', desc='min y') max_y = traits.Int(argstr='-Y %d', desc='max y') min_x = traits.Int(argstr='-x %d', desc='min x') max_x = traits.Int(argstr='-X %d', desc='max x') save = traits.Bool(desc = 'save the elements of the tensor', argstr='--save_tensor') sse = traits.Bool(desc = 'output sum of squared errors', argstr='--sse') cni = File(exists=True, desc = 'input counfound regressors', argstr='-cni %s') little_bit = traits.Bool(desc = 'only process small area of brain', argstr='--littlebit') class DTIFitOutputSpec(TraitedSpec): V1 = File(exists = True, desc = 'path/name of file with the 1st eigenvector') V2 = File(exists = True, desc = 'path/name of file with the 2nd eigenvector') V3 = File(exists = True, desc = 'path/name of file with the 3rd eigenvector') L1 = File(exists = True, desc = 'path/name of file with the 1st eigenvalue') L2 = File(exists = True, desc = 'path/name of file with the 2nd eigenvalue') L3 = File(exists = True, desc = 'path/name of file with the 3rd eigenvalue') MD = File(exists = True, desc = 'path/name of file with the mean diffusivity') FA = File(exists = True, desc = 'path/name of file with the fractional anisotropy') S0 = File(exists = True, desc = 'path/name of file with the raw T2 signal with no '+ 'diffusion weighting') class DTIFit(FSLCommand): """ Use FSL dtifit command for fitting a diffusion tensor model at each voxel Example ------- >>> from nipype.interfaces import fsl >>> dti = fsl.DTIFit() >>> dti.inputs.dwi = 'diffusion.nii' >>> dti.inputs.bvecs = 'bvecs' >>> dti.inputs.bvals = 'bvals' >>> dti.inputs.base_name = 'TP' >>> dti.inputs.mask = 'mask.nii' >>> dti.cmdline 'dtifit -k diffusion.nii -o TP -m mask.nii -r bvecs -b bvals' """ _cmd = 'dtifit' input_spec = DTIFitInputSpec output_spec = DTIFitOutputSpec def _list_outputs(self): outputs = self.output_spec().get() for k in outputs.keys(): if k not in ('outputtype','environ','args'): outputs[k] = self._gen_fname(self.inputs.base_name,suffix = '_'+k) return outputs class EddyCorrectInputSpec(FSLCommandInputSpec): in_file = File(exists=True,desc = '4D input file',argstr='%s', position=0, mandatory=True) out_file = File(desc = '4D output file',argstr='%s', position=1, genfile=True) ref_num = traits.Int(argstr='%d', position=2, desc='reference number',mandatory=True) class EddyCorrectOutputSpec(TraitedSpec): eddy_corrected = File(exists=True, desc='path/name of 4D eddy corrected output file') class EddyCorrect(FSLCommand): """ Use FSL eddy_correct command for correction of eddy current distortion Example ------- >>> from nipype.interfaces import fsl >>> eddyc = fsl.EddyCorrect(in_file='diffusion.nii',out_file="diffusion_edc.nii", ref_num=0) >>> eddyc.cmdline 'eddy_correct diffusion.nii diffusion_edc.nii 0' """ _cmd = 'eddy_correct' input_spec = EddyCorrectInputSpec output_spec = EddyCorrectOutputSpec def _run_interface(self, runtime): if not isdefined(self.inputs.out_file): self.inputs.out_file = self._gen_fname(self.inputs.in_file,suffix = '_edc') runtime = super(EddyCorrect, self)._run_interface(runtime) if runtime.stderr: runtime.returncode = 1 return runtime def _list_outputs(self): outputs = self.output_spec().get() outputs['eddy_corrected'] = self.inputs.out_file if not isdefined(outputs['eddy_corrected']): outputs['eddy_corrected'] = self._gen_fname(self.inputs.in_file,suffix = '_edc') return outputs def _gen_filename(self, name): if name is 'out_file': return self._list_outputs()['eddy_corrected'] else: return None class BEDPOSTXInputSpec(FSLCommandInputSpec): dwi = File(exists=True, desc = 'diffusion weighted image data file',mandatory=True) mask = File(exists=True, desc = 'bet binary mask file',mandatory=True) bvecs = File(exists=True, desc = 'b vectors file',mandatory=True) bvals = File(exists=True,desc = 'b values file',mandatory=True) bpx_directory = Directory('bedpostx',argstr='%s',usedefault=True, desc='the name for this subject''s bedpostx folder') fibres = traits.Int(1,argstr='-n %d', desc='number of fibres per voxel') weight = traits.Float(1.00,argstr='-w %.2f', desc='ARD weight, more weight means less'+ ' secondary fibres per voxel') burn_period = traits.Int(1000,argstr='-b %d', desc='burnin period') jumps = traits.Int(1250,argstr='-j %d', desc='number of jumps') sampling = traits.Int(25,argstr='-s %d', desc='sample every') class BEDPOSTXOutputSpec(TraitedSpec): bpx_out_directory = Directory(exists=True, field='dir', desc = 'path/name of directory with all '+ 'bedpostx output files for this subject') xfms_directory = Directory(exists=True, field='dir', desc = 'path/name of directory with the '+ 'tranformation matrices') merged_thsamples = traits.List(File, exists=True, desc='a list of path/name of 4D volume with samples from the distribution on theta') merged_phsamples = traits.List(File, exists=True, desc='a list of path/name of file with samples from the distribution on phi') merged_fsamples = traits.List(File, exists=True, desc='a list of path/name of 4D volume with samples from the distribution on'+ ' anisotropic volume fraction') mean_thsamples = traits.List(File, exists=True, desc='a list of path/name of 3D volume with mean of distribution on theta') mean_phsamples = traits.List(File, exists=True, desc='a list of path/name of 3D volume with mean of distribution on phi') mean_fsamples = traits.List(File, exists=True, desc='a list of path/name of 3D volume with mean of distribution on f anisotropy') dyads = traits.List(File, exists=True, desc='a list of path/name of mean of PDD distribution in vector form') class BEDPOSTX(FSLCommand): """ Use FSL bedpostx command for local modelling of diffusion parameters Example ------- >>> from nipype.interfaces import fsl >>> bedp = fsl.BEDPOSTX(bpx_directory='subjdir', bvecs='bvecs', bvals='bvals', dwi='diffusion.nii', \ mask='mask.nii', fibres=1) >>> bedp.cmdline 'bedpostx subjdir -n 1' """ _cmd = 'bedpostx' input_spec = BEDPOSTXInputSpec output_spec = BEDPOSTXOutputSpec can_resume = True def _run_interface(self, runtime): #create the subject specific bpx_directory bpx_directory = os.path.join(os.getcwd(),self.inputs.bpx_directory) self.inputs.bpx_directory = bpx_directory if not os.path.exists(bpx_directory): os.makedirs(bpx_directory) # copy the dwi,bvals,bvecs, and mask files to that directory shutil.copyfile(self.inputs.mask,self._gen_fname('nodif_brain_mask',suffix='',cwd=self.inputs.bpx_directory)) shutil.copyfile(self.inputs.dwi,self._gen_fname('data',suffix='',cwd=self.inputs.bpx_directory)) shutil.copyfile(self.inputs.bvals,os.path.join(self.inputs.bpx_directory,'bvals')) shutil.copyfile(self.inputs.bvecs,os.path.join(self.inputs.bpx_directory,'bvecs')) return super(BEDPOSTX, self)._run_interface(runtime) def _list_outputs(self): outputs = self.output_spec().get() outputs['bpx_out_directory'] = os.path.join(os.getcwd(),self.inputs.bpx_directory+'.bedpostX') outputs['xfms_directory'] = os.path.join(os.getcwd(),self.inputs.bpx_directory+'.bedpostX','xfms') for k in outputs.keys(): if k not in ('outputtype','environ','args','bpx_out_directory','xfms_directory'): outputs[k]=[] for n in range(self.inputs.fibres): outputs['merged_thsamples'].append(self._gen_fname('merged_th'+repr(n+1)+'samples',suffix='',cwd=outputs['bpx_out_directory'])) outputs['merged_phsamples'].append(self._gen_fname('merged_ph'+repr(n+1)+'samples',suffix='',cwd=outputs['bpx_out_directory'])) outputs['merged_fsamples'].append(self._gen_fname('merged_f'+repr(n+1)+'samples',suffix='',cwd=outputs['bpx_out_directory'])) outputs['mean_thsamples'].append(self._gen_fname('mean_th'+repr(n+1)+'samples',suffix='',cwd=outputs['bpx_out_directory'])) outputs['mean_phsamples'].append(self._gen_fname('mean_ph'+repr(n+1)+'samples',suffix='',cwd=outputs['bpx_out_directory'])) outputs['mean_fsamples'].append(self._gen_fname('mean_f'+repr(n+1)+'samples',suffix='',cwd=outputs['bpx_out_directory'])) outputs['dyads'].append(self._gen_fname('dyads'+repr(n+1),suffix='',cwd=outputs['bpx_out_directory'])) return outputs class TBSS1PreprocInputSpec(FSLCommandInputSpec): img_list = traits.List(File(exists=True), mandatory=True, desc = 'list with filenames of the FA images', sep = " ", argstr="%s") class TBSS1PreprocOutputSpec(TraitedSpec): tbss_dir = Directory(exists=True, field='dir', desc='path/name of directory with FA images') class TBSS1Preproc(FSLCommand): """XXX UNSTABLE DO NOT USE Use FSL TBSS1Preproc for preparing your FA data in your TBSS working directory in the right format Example ------- >>> import nipype.interfaces.fsl.dti as fsl >>> tbss1 = fsl.TBSS1Preproc(img_list=['functional.nii','functional2.nii','functional3.nii']) >>> tbss1.cmdline 'tbss_1_preproc functional.nii functional2.nii functional3.nii' """ _cmd = 'tbss_1_preproc' input_spec = TBSS1PreprocInputSpec output_spec = TBSS1PreprocOutputSpec def _run_interface(self, runtime): for n in self.inputs.img_list: shutil.copyfile(n,os.path.basename(n)) runtime = super(TBSS1Preproc, self)._run_interface(runtime) if runtime.stderr: runtime.returncode = 1 return runtime def _list_outputs(self): outputs = self.output_spec().get() outputs['tbss_dir'] = os.getcwd() return outputs def _format_arg(self, name, spec, value): if name == "img_list": new_list = [os.path.basename(fname) for fname in self.inputs.img_list] return super(TBSS1Preproc, self)._format_arg("img_list", spec, new_list) return super(TBSS1Preproc, self)._format_arg(name, spec, value) class TBSS2RegInputSpec(FSLCommandInputSpec): tbss_dir = Directory(exists=True, field='dir', desc = 'path/name of directory containing the FA and origdata folders '+ 'generated by tbss_1_preproc', mandatory=True) _xor_inputs = ('FMRIB58FA', 'target_img','find_target') FMRIB58FA = traits.Bool(desc='use FMRIB58_FA_1mm as target for nonlinear registrations', argstr='-T', xor=_xor_inputs) target_img = traits.Str(desc='use given image as target for nonlinear registrations', argstr='-t %s', xor=_xor_inputs) find_target = traits.Bool(desc='find best target from all images in FA', argstr='-n', xor=_xor_inputs) class TBSS2RegOutputSpec(TraitedSpec): tbss_dir = Directory(exists=True, field='dir', desc='path/name of directory containing the FA and origdata folders '+ 'generated by tbss_1_preproc') class TBSS2Reg(FSLCommand): """ XXX UNSTABLE DO NOT USE Use FSL TBSS2Reg for applying nonlinear registration of all FA images into standard space Example ------- >>> import nipype.interfaces.fsl.dti as fsl >>> tbss2 = fsl.TBSS2Reg(tbss_dir=os.getcwd(),FMRIB58FA=True) >>> tbss2.cmdline 'tbss_2_reg -T' """ _cmd = 'tbss_2_reg' input_spec = TBSS2RegInputSpec output_spec = TBSS2RegOutputSpec def _run_interface(self, runtime): runtime.cwd = self.inputs.tbss_dir return super(TBSS2Reg, self)._run_interface(runtime) def _list_outputs(self): outputs = self.output_spec().get() outputs['tbss_dir'] = self.inputs.tbss_dir return outputs class TBSS3PostregInputSpec(FSLCommandInputSpec): tbss_dir = Directory(exists=True, field='dir', desc = 'path/name of directory containing the FA and origdata '+ 'folders generated by tbss_1_preproc', mandatory=True) _xor_inputs = ('subject_mean', 'FMRIB58FA') subject_mean = traits.Bool(desc='derive mean_FA and mean_FA_skeleton from mean of all subjects in study', argstr='-S', xor=_xor_inputs) FMRIB58FA = traits.Bool(desc='use FMRIB58_FA and its skeleton instead of study-derived mean and skeleton', argstr='-T', xor=_xor_inputs) class TBSS3PostregOutputSpec(TraitedSpec): tbss_dir = Directory(exists=True, field='dir', desc='path/name of directory containing the FA, origdata, and '+ 'stats folders generated by tbss_1_preproc and this command') all_FA = File(exists=True, desc='path/name of 4D volume with all FA images') mean_FA_skeleton = File(exists=True, desc='path/name of 3D volume with mean FA skeleton') mean_FA = File(exists=True, desc='path/name of 3D volume with mean FA image') class TBSS3Postreg(FSLCommand): """ XXX UNSTABLE DO NOT USE Use FSL TBSS3Postreg for creating the mean FA image and skeletonise it Example ------- >>> import nipype.interfaces.fsl.dti as fsl >>> tbss3 = fsl.TBSS3Postreg(subject_mean=True, tbss_dir='tbss_dir') >>> tbss3.cmdline 'tbss_3_postreg -S' """ _cmd = 'tbss_3_postreg' input_spec = TBSS3PostregInputSpec output_spec = TBSS3PostregOutputSpec def _run_interface(self, runtime): runtime.cwd = self.inputs.tbss_dir runtime = super(TBSS3Postreg, self)._run_interface(runtime) if runtime.stderr: runtime.returncode = 1 return runtime def _list_outputs(self): outputs = self.output_spec().get() outputs['tbss_dir'] = self.inputs.tbss_dir stats = os.path.join(self.inputs.tbss_dir,'stats') outputs['all_FA'] = self._gen_fname('all_FA', cwd=os.path.abspath(stats),suffix='' ) outputs['mean_FA_skeleton'] = self._gen_fname('mean_FA_skeleton', cwd=os.path.abspath(stats),suffix='' ) outputs['mean_FA'] = self._gen_fname('mean_FA', cwd=os.path.abspath(stats),suffix='' ) return outputs class TBSS4PrestatsInputSpec(FSLCommandInputSpec): tbss_dir = Directory(exists=True, field='dir', desc = 'path/name of directory containing the FA, origdata, and '+ 'stats folders generated by tbss_1_preproc and tbss_3_postreg', mandatory=True) threshold = traits.Float(argstr='%.3f', desc='threshold value',mandatory=True) class TBSS4PrestatsOutputSpec(TraitedSpec): all_FA_skeletonised = File(exists=True, desc='path/name of 4D volume with all FA images skeletonized') mean_FA_skeleton_mask = File(exists=True, desc='path/name of mean FA skeleton mask') tbss_dir = Directory(exists=True, field='dir', desc = 'path/name of directory containing the FA, origdata, and stats '+ 'folders generated by tbss_1_preproc and tbss_3_postreg') class TBSS4Prestats(FSLCommand): """XXX UNSTABLE DO NOT USE Use FSL TBSS4Prestats thresholds the mean FA skeleton image at the chosen threshold Example ------- >>> import nipype.interfaces.fsl.dti as fsl >>> tbss4 = fsl.TBSS4Prestats(threshold=0.3, tbss_dir="tbss_dir") >>> tbss4.cmdline 'tbss_4_prestats 0.300' """ _cmd = 'tbss_4_prestats' input_spec = TBSS4PrestatsInputSpec output_spec = TBSS4PrestatsOutputSpec def _run_interface(self, runtime): runtime.cwd = self.inputs.tbss_dir return super(TBSS4Prestats, self)._run_interface(runtime) def _list_outputs(self): outputs = self.output_spec().get() outputs['tbss_dir'] = self.inputs.tbss_dir stats = os.path.join(self.inputs.tbss_dir,'stats') outputs['all_FA_skeletonised'] = self._gen_fname('all_FA_skeletonised', cwd=os.path.abspath(stats), suffix='' ) outputs['mean_FA_skeleton_mask'] = self._gen_fname('mean_FA_skeleton_mask', cwd=os.path.abspath(stats), suffix='' ) return outputs class RandomiseInputSpec(FSLCommandInputSpec): in_file = File(exists=True,desc = '4D input file',argstr='-i %s', position=0, mandatory=True) base_name = traits.Str('tbss_',desc = 'the rootname that all generated files will have', argstr='-o %s', position=1, usedefault=True) design_mat = File(exists=True,desc = 'design matrix file',argstr='-d %s', position=2, mandatory=True) tcon = File(exists=True,desc = 't contrasts file',argstr='-t %s', position=3, mandatory=True) fcon = File(exists=True,desc = 'f contrasts file',argstr='-f %s') mask = File(exists=True,desc = 'mask image',argstr='-m %s') x_block_labels = File(exists=True,desc = 'exchangeability block labels file',argstr='-e %s') demean = traits.Bool(desc = 'demean data temporally before model fitting', argstr='-D') one_sample_group_mean = traits.Bool(desc = 'perform 1-sample group-mean test instead of generic permutation test', argstr='-l') show_total_perms = traits.Bool(desc = 'print out how many unique permutations would be generated and exit', argstr='-q') show_info_parallel_mode = traits.Bool(desc = 'print out information required for parallel mode and exit', argstr='-Q') vox_p_values = traits.Bool(desc = 'output voxelwise (corrected and uncorrected) p-value images', argstr='-x') tfce = traits.Bool(desc = 'carry out Threshold-Free Cluster Enhancement', argstr='-T') tfce2D = traits.Bool(desc = 'carry out Threshold-Free Cluster Enhancement with 2D optimisation', argstr='--T2') f_only = traits.Bool(desc = 'calculate f-statistics only', argstr='--f_only') raw_stats_imgs = traits.Bool(desc = 'output raw ( unpermuted ) statistic images', argstr='-R') p_vec_n_dist_files = traits.Bool(desc = 'output permutation vector and null distribution text files', argstr='-P') num_perm = traits.Int(argstr='-n %d', desc='number of permutations (default 5000, set to 0 for exhaustive)') seed = traits.Int(argstr='--seed %d', desc='specific integer seed for random number generator') var_smooth = traits.Int(argstr='-v %d', desc='use variance smoothing (std is in mm)') c_thresh = traits.Float(argstr='-c %.2f', desc='carry out cluster-based thresholding') cm_thresh = traits.Float(argstr='-C %.2f', desc='carry out cluster-mass-based thresholding') f_c_thresh = traits.Float(argstr='-F %.2f', desc='carry out f cluster thresholding') f_cm_thresh = traits.Float(argstr='-S %.2f', desc='carry out f cluster-mass thresholding') tfce_H = traits.Float(argstr='--tfce_H %.2f', desc='TFCE height parameter (default=2)') tfce_E = traits.Float(argstr='--tfce_E %.2f', desc='TFCE extent parameter (default=0.5)') tfce_C = traits.Float(argstr='--tfce_C %.2f', desc='TFCE connectivity (6 or 26; default=6)') vxl = traits.List(traits.Int,argstr='--vxl %d', desc='list of numbers indicating voxelwise EVs'+ 'position in the design matrix (list order corresponds to files in vxf option)') vxf = traits.List(traits.Int,argstr='--vxf %d', desc='list of 4D images containing voxelwise EVs'+ '(list order corresponds to numbers in vxl option)') class RandomiseOutputSpec(TraitedSpec): tstat1_file = File(exists=True,desc = 'path/name of tstat image corresponding to the first t contrast') class Randomise(FSLCommand): """XXX UNSTABLE DO NOT USE FSL Randomise: feeds the 4D projected FA data into GLM modelling and thresholding in order to find voxels which correlate with your model Example ------- >>> import nipype.interfaces.fsl.dti as fsl >>> rand = fsl.Randomise(in_file='allFA.nii', \ mask = 'mask.nii', \ tcon='design.con', \ design_mat='design.mat') >>> rand.cmdline 'randomise -i allFA.nii -o tbss_ -d design.mat -t design.con -m mask.nii' """ _cmd = 'randomise' input_spec = RandomiseInputSpec output_spec = RandomiseOutputSpec def _list_outputs(self): outputs = self.output_spec().get() outputs['tstat1_file'] = self._gen_fname(self.inputs.base_name,suffix='_tstat1') return outputs class ProbTrackXInputSpec(FSLCommandInputSpec): samplesbase_name = traits.Str(desc = 'the rootname/base_name for samples files',argstr='-s %s') bpx_directory = Directory(exists=True, field='dir', desc = 'path/name of directory with all '+ 'bedpostx output files',mandatory=True) mask = File(exists=True, desc='bet binary mask file in diffusion space', argstr='-m %s', mandatory=True) seed_file = File(exists=True, desc='seed volume, or voxel, or ascii file with multiple'+ 'volumes, or freesurfer label file',argstr='-x %s', mandatory=True) mode = traits.Str(desc='options: simple (single seed voxel), seedmask (mask of seed voxels),'+ 'twomask_symm (two bet binary masks) ', argstr='--mode=%s') target_masks = InputMultiPath(File(exits=True),desc='list of target masks - '+ 'required for seeds_to_targets classification', argstr='--targetmasks=%s') mask2 =File(exists=True,desc='second bet binary mask (in diffusion space) in twomask_symm mode', argstr='--mask2=%s') waypoints = File(exists=True, desc='waypoint mask or ascii list of waypoint masks - '+ 'only keep paths going through ALL the masks',argstr='--waypoints=%s') network = traits.Bool(desc='activate network mode - only keep paths going through '+ 'at least one seed mask (required if multiple seed masks)', argstr='--network') mesh = File(exists=True,desc='Freesurfer-type surface descriptor (in ascii format)', argstr='--mesh=%s') seed_ref = File(exists=True, desc='reference vol to define seed space in '+ 'simple mode - diffusion space assumed if absent', argstr='--seedref=%s') out_dir = Directory(os.getcwd(),exists=True,argstr='--dir=%s',usedefault=True, desc='directory to put the final volumes in') force_dir = traits.Bool(desc='use the actual directory name given - i.e. '+ 'do not add + to make a new directory',argstr='--forcedir') opd = traits.Bool(desc='outputs path distributions',argstr='--opd') correct_path_distribution = traits.Bool(desc='correct path distribution for the length of the pathways', argstr='--pd') os2t = traits.Bool(desc='Outputs seeds to targets',argstr='--os2t') paths_file = File('nipype_fdtpaths',usedefault=True,argstr='--out=%s', desc='produces an output file (default is fdt_paths)') avoid_mp = File(exists=True, desc='reject pathways passing through locations given by this mask', argstr='--avoid=%s') stop_mask = File(exists=True,argstr='--stop=%s', desc='stop tracking at locations given by this mask file') xfm = File(exists=True, argstr='--xfm=%s', desc='transformation matrix taking seed space to DTI space '+ '(either FLIRT matrix or FNIRT warp_field) - default is identity') inv_xfm = File( argstr='--invxfm=%s',desc='transformation matrix taking DTI space to seed'+ ' space (compulsory when using a warp_field for seeds_to_dti)') n_samples = traits.Int(argstr='--nsamples=%d',desc='number of samples - default=5000') n_steps = traits.Int(argstr='--nsteps=%d',desc='number of steps per sample - default=2000') dist_thresh = traits.Float(argstr='--distthresh=%.3f',desc='discards samples shorter than '+ 'this threshold (in mm - default=0)') c_thresh = traits.Float(argstr='--cthr=%.3f',desc='curvature threshold - default=0.2') sample_random_points = traits.Bool(argstr='--sampvox',desc='sample random points within seed voxels') step_length = traits.Float(argstr='--steplength=%.3f',desc='step_length in mm - default=0.5') loop_check = traits.Bool(argstr='--loopcheck',desc='perform loop_checks on paths -'+ ' slower, but allows lower curvature threshold') use_anisotropy = traits.Bool(argstr='--usef',desc='use anisotropy to constrain tracking') rand_fib = traits.Enum(0,1,2,3,argstr='--randfib %d',desc='options: 0 - default, 1 - to randomly sample'+ ' initial fibres (with f > fibthresh), 2 - to sample in '+ 'proportion fibres (with f>fibthresh) to f, 3 - to sample ALL '+ 'populations at random (even if f<fibthresh)') fibst = traits.Int(argstr='--fibst=%d',desc='force a starting fibre for tracking - '+ 'default=1, i.e. first fibre orientation. Only works if randfib==0') mod_euler = traits.Bool(argstr='--modeuler',desc='use modified euler streamlining') random_seed = traits.Bool(argstr='--rseed',desc='random seed') s2tastext = traits.Bool(argstr='--s2tastext',desc='output seed-to-target counts as a'+ ' text file (useful when seeding from a mesh)') class ProbTrackXOutputSpec(TraitedSpec): log = File(exists=True, desc='path/name of a text record of the command that was run') fdt_paths = File(exists=True, desc='path/name of a 3D image file containing the output '+ 'connectivity distribution to the seed mask') way_total = File(exists=True, desc='path/name of a text file containing a single number '+ 'corresponding to the total number of generated tracts that '+ 'have not been rejected by inclusion/exclusion mask criteria') targets = traits.List(File,exists=True,desc='a list with all generated seeds_to_target files') class ProbTrackX(FSLCommand): """ Use FSL probtrackx for tractography on bedpostx results Examples -------- >>> from nipype.interfaces import fsl >>> pbx = fsl.ProbTrackX(samplesbase_name='merged', mask='mask.nii', \ seed_file='MASK_average_thal_right.nii', mode='seedmask', \ xfm='trans.mat', n_samples=3, n_steps=10, force_dir=True, opd=True, os2t=True, \ bpx_directory='bedpostxout', target_masks = ['targets_MASK1.nii','targets_MASK2.nii'], \ paths_file='nipype_fdtpaths', out_dir='.') >>> pbx.cmdline 'probtrackx --forcedir -m mask.nii --mode=seedmask --nsamples=3 --nsteps=10 --opd --os2t --dir=. --out=nipype_fdtpaths -s merged -x MASK_average_thal_right.nii --targetmasks=targets.txt --xfm=trans.mat' """ _cmd = 'probtrackx' input_spec = ProbTrackXInputSpec output_spec = ProbTrackXOutputSpec def _run_interface(self, runtime): if not isdefined(self.inputs.samplesbase_name): self.inputs.samplesbase_name = os.path.join(self.inputs.bpx_directory,'merged') if isdefined(self.inputs.target_masks): f = open("targets.txt","w") for target in self.inputs.target_masks: f.write("%s\n"%target) f.close() return super(ProbTrackX, self)._run_interface(runtime) def _format_arg(self, name, spec, value): if name == 'target_masks' and isdefined(value): fname = "targets.txt" return super(ProbTrackX, self)._format_arg(name, spec, [fname]) else: return super(ProbTrackX, self)._format_arg(name, spec, value) def _list_outputs(self): outputs = self.output_spec().get() outputs['log'] = self._gen_fname('probtrackx',cwd=self.inputs.out_dir, suffix='.log',change_ext=False) outputs['way_total'] = self._gen_fname('waytotal',cwd=self.inputs.out_dir, suffix='',change_ext=False) outputs['fdt_paths'] = self._gen_fname(self.inputs.paths_file, cwd=self.inputs.out_dir,suffix='') # handle seeds-to-target output files if isdefined(self.inputs.target_masks): outputs['targets']=[] for target in self.inputs.target_masks: outputs['targets'].append(self._gen_fname('seeds_to_'+os.path.split(target)[1], cwd=self.inputs.out_dir,suffix='')) return outputs class VecRegInputSpec(FSLCommandInputSpec): in_file = File(exists=True,argstr='-i %s',desc='filename for input vector or tensor field', mandatory=True) out_file = File(argstr='-o %s',desc='filename for output registered vector or tensor field', genfile=True) ref_vol = File(exists=True,argstr='-r %s',desc='filename for reference (target) volume', mandatory=True) affine_mat = File(exists=True,argstr='-t %s',desc='filename for affine transformation matrix') warp_field = File(exists=True,argstr='-w %s',desc='filename for 4D warp field for nonlinear registration') rotation_mat = File(exists=True,argstr='--rotmat=%s',desc='filename for secondary affine matrix'+ 'if set, this will be used for the rotation of the vector/tensor field') rotation_warp = File(exists=True,argstr='--rotwarp=%s',desc='filename for secondary warp field'+ 'if set, this will be used for the rotation of the vector/tensor field') interpolation = traits.Enum("nearestneighbour", "trilinear", "sinc", "spline",argstr='--interp=%s',desc='interpolation method : '+ 'nearestneighbour, trilinear (default), sinc or spline') mask = File(exists=True,argstr='-m %s',desc='brain mask in input space') ref_mask = File(exists=True,argstr='--refmask=%s',desc='brain mask in output space '+ '(useful for speed up of nonlinear reg)') class VecRegOutputSpec(TraitedSpec): out_file = File(exists=True,desc='path/name of filename for the registered vector or tensor field') class VecReg(FSLCommand): """Use FSL vecreg for registering vector data For complete details, see the `FDT Documentation <http://www.fmrib.ox.ac.uk/fsl/fdt/fdt_vecreg.html>`_ Example ------- >>> from nipype.interfaces import fsl >>> vreg = fsl.VecReg(in_file='diffusion.nii', \ affine_mat='trans.mat', \ ref_vol='mni.nii', \ out_file='diffusion_vreg.nii') >>> vreg.cmdline 'vecreg -t trans.mat -i diffusion.nii -o diffusion_vreg.nii -r mni.nii' """ _cmd = 'vecreg' input_spec = VecRegInputSpec output_spec = VecRegOutputSpec def _run_interface(self, runtime): if not isdefined(self.inputs.out_file): pth,base_name = os.path.split(self.inputs.in_file) self.inputs.out_file = self._gen_fname(base_name,cwd=os.path.abspath(pth), suffix = '_vreg') return super(VecReg, self)._run_interface(runtime) def _list_outputs(self): outputs = self.output_spec().get() outputs['out_file'] = self.inputs.out_file if not isdefined(outputs['out_file']) and isdefined(self.inputs.in_file): pth,base_name = os.path.split(self.inputs.in_file) outputs['out_file'] = self._gen_fname(base_name,cwd=os.path.abspath(pth), suffix = '_vreg') return outputs def _gen_filename(self, name): if name is 'out_file': return self._list_outputs()[name] else: return None class ProjThreshInputSpec(FSLCommandInputSpec): in_files = traits.List(File,exists=True,argstr='%s',desc='a list of input volumes', mandatory=True,position=0) threshold = traits.Int(argstr='%d',desc='threshold indicating minimum '+ 'number of seed voxels entering this mask region', mandatory=True,position=1) class ProjThreshOuputSpec(TraitedSpec): out_files = traits.List(File,exists=True,desc='path/name of output volume after thresholding') class ProjThresh(FSLCommand): """Use FSL proj_thresh for thresholding some outputs of probtrack For complete details, see the `FDT Documentation <http://www.fmrib.ox.ac.uk/fsl/fdt/fdt_thresh.html>`_ Example ------- >>> from nipype.interfaces import fsl >>> ldir = ['seeds_to_M1.nii', 'seeds_to_M2.nii'] >>> pThresh = fsl.ProjThresh(in_files=ldir,threshold=3) >>> pThresh.cmdline 'proj_thresh seeds_to_M1.nii seeds_to_M2.nii 3' """ _cmd = 'proj_thresh' input_spec = ProjThreshInputSpec output_spec = ProjThreshOuputSpec def _list_outputs(self): outputs = self.output_spec().get() outputs['out_files'] = [] for name in self.inputs.in_files: cwd,base_name = os.path.split(name) outputs['out_files'].append(self._gen_fname(base_name,cwd=cwd,suffix='_proj_seg_thr_'+ repr(self.inputs.threshold))) return outputs class FindTheBiggestInputSpec(FSLCommandInputSpec): in_files = traits.List(File,exists=True,argstr='%s',desc='a list of input volumes or a singleMatrixFile', position=0,mandatory=True) out_file = File(argstr='%s',desc='file with the resulting segmentation',position=2,genfile=True) class FindTheBiggestOutputSpec(TraitedSpec): out_file = File(exists=True,argstr='%s',desc='output file indexed in order of input files') class FindTheBiggest(FSLCommand): """ Use FSL find_the_biggest for performing hard segmentation on the outputs of connectivity-based thresholding in probtrack. For complete details, see the `FDT Documentation. <http://www.fmrib.ox.ac.uk/fsl/fdt/fdt_biggest.html>`_ Example ------- >>> from nipype.interfaces import fsl >>> ldir = ['seeds_to_M1.nii', 'seeds_to_M2.nii'] >>> fBig = fsl.FindTheBiggest(in_files=ldir, out_file='biggestSegmentation') >>> fBig.cmdline 'find_the_biggest seeds_to_M1.nii seeds_to_M2.nii biggestSegmentation' """ _cmd='find_the_biggest' input_spec = FindTheBiggestInputSpec output_spec = FindTheBiggestOutputSpec def _run_interface(self, runtime): if not isdefined(self.inputs.out_file): self.inputs.out_file = self._gen_fname('biggestSegmentation',suffix='') return super(FindTheBiggest, self)._run_interface(runtime) def _list_outputs(self): outputs = self.output_spec().get() outputs['out_file'] = self.inputs.out_file if not isdefined(outputs['out_file']): outputs['out_file'] = self._gen_fname('biggestSegmentation',suffix = '') return outputs def _gen_filename(self, name): if name is 'out_file': return self._list_outputs()[name] else: return None
{ "content_hash": "6cc444438cbd64366033cf10821f3f32", "timestamp": "", "source": "github", "line_count": 779, "max_line_length": 206, "avg_line_length": 50.03209242618742, "alnum_prop": 0.6096215522771007, "repo_name": "satra/NiPypeold", "id": "85c59fa61e630dcb3c46e79f0a9c2b2fc34a29cb", "size": "39089", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "nipype/interfaces/fsl/dti.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "JavaScript", "bytes": "931" }, { "name": "Objective-C", "bytes": "4736" }, { "name": "Python", "bytes": "1389618" }, { "name": "Tcl", "bytes": "43377" } ], "symlink_target": "" }
export { default } from './AndroidOriginal'
{ "content_hash": "83d555d1ab6c636143a7f8f944596e37", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 43, "avg_line_length": 44, "alnum_prop": 0.7272727272727273, "repo_name": "fpoumian/react-devicon", "id": "c9812a436c1965cac45cef02574ff97697f5927b", "size": "44", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/components/android/original/index.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "287440" } ], "symlink_target": "" }
'use strict'; var React = require('react'); var StylePropable = require('../mixins/style-propable'); var TimeDisplay = require("./time-display"); var ClockButton = require("./clock-button"); var ClockHours = require("./clock-hours"); var ClockMinutes = require("./clock-minutes"); var Clock = React.createClass({ displayName: 'Clock', mixins: [StylePropable], propTypes: { initialTime: React.PropTypes.object, mode: React.PropTypes.oneOf(['hour', 'minute']), format: React.PropTypes.oneOf(['ampm', '24hr']), isActive: React.PropTypes.bool }, getDefaultProps: function getDefaultProps() { return { initialTime: new Date() }; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { this.setState({ selectedTime: nextProps.initialTime }); }, getInitialState: function getInitialState() { return { selectedTime: this.props.initialTime, mode: 'hour' }; }, _setMode: function _setMode(mode) { var _this = this; setTimeout(function () { _this.setState({ mode: mode }); }, 100); }, _setAffix: function _setAffix(affix) { if (affix === this._getAffix()) return; var hours = this.state.selectedTime.getHours(); if (affix === "am") { this.handleChangeHours(hours - 12); return; } this.handleChangeHours(hours + 12); }, _getAffix: function _getAffix() { if (this.props.format !== "ampm") return ""; var hours = this.state.selectedTime.getHours(); if (hours < 12) { return "am"; } return "pm"; }, _getButtons: function _getButtons() { var buttons = []; var isAM = this._getIsAM(); if (this.props.format === 'ampm') { buttons = [React.createElement( ClockButton, { position: 'left', onTouchTap: this._setAffix.bind(this, "am"), selected: isAM }, "AM" ), React.createElement( ClockButton, { position: 'right', onTouchTap: this._setAffix.bind(this, "pm"), selected: !isAM }, "PM" )]; } return buttons; }, _getIsAM: function _getIsAM() { return this._getAffix() === "am"; }, render: function render() { var clock = null; var buttons = this._getButtons(); var styles = { root: {}, container: { height: 280, padding: 10 } }; if (this.state.mode === "hour") { clock = React.createElement(ClockHours, { key: 'hours', format: this.props.format, onChange: this.handleChangeHours, initialHours: this.state.selectedTime.getHours() }); } else { clock = React.createElement(ClockMinutes, { key: 'minutes', onChange: this.handleChangeMinutes, initialMinutes: this.state.selectedTime.getMinutes() }); } return React.createElement( 'div', { style: styles.root }, React.createElement(TimeDisplay, { selectedTime: this.state.selectedTime, mode: this.state.mode, format: this.props.format, affix: this._getAffix(), onSelectHour: this._setMode.bind(this, 'hour'), onSelectMin: this._setMode.bind(this, 'minute') }), React.createElement( 'div', { style: styles.container }, clock ), buttons ); }, handleChangeHours: function handleChangeHours(hours, finished) { var _this2 = this; var time = new Date(this.state.selectedTime); time.setHours(hours); this.setState({ selectedTime: time }); if (finished) { setTimeout(function () { _this2.setState({ mode: 'minute' }); }, 100); } }, handleChangeMinutes: function handleChangeMinutes(minutes) { var time = new Date(this.state.selectedTime); time.setMinutes(minutes); this.setState({ selectedTime: time }); }, getSelectedTime: function getSelectedTime() { return this.state.selectedTime; } }); module.exports = Clock;
{ "content_hash": "34c88c9bed5a789544d5b8b90f3b1174", "timestamp": "", "source": "github", "line_count": 171, "max_line_length": 92, "avg_line_length": 23.432748538011698, "alnum_prop": 0.5964562016471175, "repo_name": "grovelabs/material-ui", "id": "fa85332dd7c4f2c0a96023d0f932497b7c86e1a9", "size": "4007", "binary": false, "copies": "2", "ref": "refs/heads/develop", "path": "lib/time-picker/clock.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "95" }, { "name": "HTML", "bytes": "1116" }, { "name": "JavaScript", "bytes": "1971466" } ], "symlink_target": "" }
'use strict'; // We want to globally mock this but jest doesn't let us do that by default // for a file that already exists. So we have to explicitly mock it. jest.mock('ReactDOM'); jest.mock('ReactDOMFeatureFlags', () => { const flags = require.requireActual('ReactDOMFeatureFlags'); return Object.assign({}, flags, { useFiber: flags.useFiber || !!process.env.REACT_DOM_JEST_USE_FIBER, }); }); var env = jasmine.getEnv(); var callCount = 0; var oldError = console.error; var newError = function() { callCount++; oldError.apply(this, arguments); }; console.error = newError; env.beforeEach(() => { callCount = 0; jasmine.addMatchers({ toBeReset() { return { compare(actual) { // TODO: Catch test cases that call spyOn() but don't inspect the mock // properly. if (actual !== newError && !jasmine.isSpy(actual)) { return { pass: false, message: 'Test did not tear down console.error mock properly.', }; } return {pass: true}; }, }; }, toNotHaveBeenCalled() { return { compare(actual) { return { pass: callCount === 0, message: 'Expected test not to warn. If the warning is expected, mock ' + 'it out using spyOn(console, \'error\'); and test that the ' + 'warning occurs.', }; }, }; }, }); }); env.afterEach(() => { expect(console.error).toBeReset(); expect(console.error).toNotHaveBeenCalled(); }); function wrapDevMatcher(obj, name) { const original = obj[name]; obj[name] = function devMatcher() { try { original.apply(this, arguments); } catch (e) { global.__hadDevFailures = e.stack; } }; } const expectDev = function expectDev(actual) { const expectation = expect(actual); if (global.__suppressDevFailures) { Object.keys(expectation).forEach((name) => { wrapDevMatcher(expectation, name); wrapDevMatcher(expectation.not, name); }); } return expectation; }; global.expectDev = expectDev;
{ "content_hash": "113e30346c3dd648c3c76913b1f87af3", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 80, "avg_line_length": 25.795180722891565, "alnum_prop": 0.5875758991125642, "repo_name": "aaron-goshine/react", "id": "18543a82485f5b8290f6ba0cd66f1a835ad340fd", "size": "2141", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "scripts/jest/test-framework-setup.js", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "5341" }, { "name": "C++", "bytes": "44974" }, { "name": "CoffeeScript", "bytes": "11786" }, { "name": "JavaScript", "bytes": "2663945" }, { "name": "Makefile", "bytes": "189" }, { "name": "Python", "bytes": "9383" }, { "name": "Shell", "bytes": "525" }, { "name": "TypeScript", "bytes": "15060" } ], "symlink_target": "" }
**DockDNS for Boot2Docker** ***Background*** DockDNS is simple and effective. However, it assumes the Docker Daemon runs on Non-TLS mode. I needed this to support TLS, and hence work out of the box for Boot2Docker (Mac / Win) based systems. Moreover, container names generated by FIG usually do not comply with DNS Naming convention. I needed to support alternate DNS resolution for these type of container names Making changes to add the following support :- 1. Support Boot2Docker TLS Endpoint of Docker REST API 2. Optimization for improving performance of DNS queries 3. More Logging 4. Error Handling 5. Added support for resolving Container names generated by Fig into a DNS Friendly name 6. Added a sample Fig Application that used DockerDNS
{ "content_hash": "26f1b9a13b9a94d15da67dc453b57380", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 367, "avg_line_length": 34.63636363636363, "alnum_prop": 0.7860892388451444, "repo_name": "vivekjuneja/DockDNS", "id": "bdaff0e398d29d475782d8aabeaaeaddda1896b9", "size": "762", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Go", "bytes": "9891" }, { "name": "Python", "bytes": "327" }, { "name": "Ruby", "bytes": "1166" } ], "symlink_target": "" }
RETCODE=$(fw_exists ${IROOT}/py3.installed) [ ! "$RETCODE" == 0 ] || { \ source $IROOT/py3.installed return 0; } PY3_ROOT=$IROOT/py3 PY3_VERSION=3.5.1 fw_get -O http://www.python.org/ftp/python/${PY3_VERSION}/Python-${PY3_VERSION}.tar.xz fw_untar Python-${PY3_VERSION}.tar.xz cd Python-${PY3_VERSION} ./configure --prefix=$PY3_ROOT --disable-shared --with-computed-gotos --quiet make -j4 --quiet 2>&1 | tee $IROOT/python3-install.log | awk '{ if (NR%100 == 0) printf "."}' make install --quiet 2>&1 | tee -a $IROOT/python3-install.log | awk '{ if (NR%100 == 0) printf "."}' cd .. $PY3_ROOT/bin/python3 -m ensurepip -U $PY3_ROOT/bin/pip3 install -U setuptools pip wheel echo "export PY3_ROOT=${PY3_ROOT}" > $IROOT/py3.installed echo -e "export PYTHONHOME=\$PY3_ROOT" >> $IROOT/py3.installed echo -e "export PATH=\$PY3_ROOT/bin:\$PATH" >> $IROOT/py3.installed source $IROOT/py3.installed
{ "content_hash": "9457e50961c8a06f38d4ea77f820c7f5", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 100, "avg_line_length": 37.375, "alnum_prop": 0.673355629877369, "repo_name": "ashawnbandy-te-tfb/FrameworkBenchmarks", "id": "3c77075fe24728c0afbe34f67d6a6a1f0affdccb", "size": "910", "binary": false, "copies": "13", "ref": "refs/heads/master", "path": "toolset/setup/linux/languages/python3.sh", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ASP", "bytes": "838" }, { "name": "ApacheConf", "bytes": "19994" }, { "name": "Batchfile", "bytes": "1479" }, { "name": "C", "bytes": "151724" }, { "name": "C#", "bytes": "243803" }, { "name": "C++", "bytes": "69752" }, { "name": "CMake", "bytes": "2862" }, { "name": "CSS", "bytes": "186916" }, { "name": "Clojure", "bytes": "44405" }, { "name": "Crystal", "bytes": "5417" }, { "name": "D", "bytes": "3939" }, { "name": "Dart", "bytes": "36881" }, { "name": "Elixir", "bytes": "12270" }, { "name": "Erlang", "bytes": "38290" }, { "name": "Go", "bytes": "72605" }, { "name": "Groovy", "bytes": "18156" }, { "name": "HTML", "bytes": "153780" }, { "name": "Haskell", "bytes": "35546" }, { "name": "Java", "bytes": "446408" }, { "name": "JavaScript", "bytes": "435562" }, { "name": "Kotlin", "bytes": "8201" }, { "name": "Lua", "bytes": "14309" }, { "name": "Makefile", "bytes": "1519" }, { "name": "MoonScript", "bytes": "2398" }, { "name": "Nginx", "bytes": "133310" }, { "name": "Nimrod", "bytes": "5106" }, { "name": "PHP", "bytes": "1011758" }, { "name": "Perl", "bytes": "11179" }, { "name": "PowerShell", "bytes": "38057" }, { "name": "Python", "bytes": "295373" }, { "name": "QMake", "bytes": "2301" }, { "name": "Racket", "bytes": "5298" }, { "name": "Ruby", "bytes": "82247" }, { "name": "Rust", "bytes": "2525" }, { "name": "Scala", "bytes": "98281" }, { "name": "Shell", "bytes": "268099" }, { "name": "Smarty", "bytes": "1338" }, { "name": "UrWeb", "bytes": "65535" }, { "name": "Volt", "bytes": "769" } ], "symlink_target": "" }
<!DOCTYPE html> <body> <script src="../../../resources/js-test.js"></script> <div id=container> <template><div></div></template> </div> <script> description('Test that cycle detection traverses over both templates and shadow roots'); var outerDiv = document.getElementById('container'); var template = document.querySelector('template'); var div = template.content.firstChild; var shadowRoot = div.attachShadow({mode: 'open'}); var shadowDiv = shadowRoot.appendChild(document.createElement('div')); shouldThrow('shadowDiv.appendChild(outerDiv)'); </script> </body>
{ "content_hash": "627a698c2fed2fa4a421f2c8c36bb8b4", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 88, "avg_line_length": 35.4375, "alnum_prop": 0.7407407407407407, "repo_name": "chromium/chromium", "id": "db04fae4cfd4831bc663d4bcb2e5fb6f8c6040ab", "size": "567", "binary": false, "copies": "9", "ref": "refs/heads/main", "path": "third_party/blink/web_tests/fast/dom/HTMLTemplateElement/cycles-in-shadow.html", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
We need to be able to test IPv6-only Kubernetes cluster configurations. However, there are many external services (e.g. DockerHub) that only work with IPv4. In order to interoperate between our IPv6-only cluster and these external IPv4 services, we configure a node in the lab to run as a NAT64 and DNS64 server. The NAT64 server operates in dual-stack mode, and it serves as a translator between the internal IPv6-only network and the external IPv4 Internet. It does this by translating any destination IPv6 addresses in egress packets that happen to have a special 64:ffd9::/64 prefix into IPv4 addresses, and it does the reverse translation in the opposite direction. The DNS64 server acts as the DNS server for kubernetes master and minion nodes. It forwards requests to the original DNS server. For any DNS answers that are returned do not contain AAAA records with IPv6 addresses (i.e.for IPv4-only services), the DNS64 server will add AAAA records that it generates by prefixing the IPv4 addresses in A records with the special, NAT64 prefix of 64:ffd9::/64. For NAT64 service, we use Jool. For DNS64 service, we use bind9. ![Screenshot](kubernetes_ipv6_topology.png) ## Installing Jool on the NAT64/DNS64 Node References: [Introduction to IPv4/IPv6 Translation](https://www.jool.mx/en/intro-xlat.html) [Jool Documentation](https://www.jool.mx/en/documentation.html) #### Install build-essential, linux-headers, and dkms: On the NAT64/DNSY64 node: ``` sudo apt-get install -y build-essential linux-headers-$(uname -r) dkms Install Kernel Modules: Reference: https://www.jool.mx/en/install-mod.html sudo -i git clone https://github.com/NICMx/Jool.git dkms install Jool exit ``` #### Install User Modules: Reference: https://www.jool.mx/en/install-usr.html On the NAT64/DNS64 node: ``` sudo -i apt-get install -y gcc make pkg-config libnl-genl-3-dev autoconf cd Jool/usr ./autogen.sh ./configure make make install exit ``` ## Configuring Jool on the NAT64/DNS64 Node References: [Stateful NAT64 Run](https://www.jool.mx/en/run-nat64.html) [Starting Jool](https://www.jool.mx/en/run-nat64.html#jool) [NAT64 Jool's Kernal Module Arguments](https://www.jool.mx/en/modprobe-nat64.html) [pool4: IPv4 Transport Address Pool](https://www.jool.mx/en/modprobe-nat64.html#pool4) #### If 'jool' does not show up in $PATH, add an alias for jool: On the NAT64/DNS64 node: ``` echo "alias jool='/usr/local/bin/jool'" >> /root/.bash_aliases source ~/.bash_aliases ``` #### Load the Jool kernel module via modprobe: Reference: https://www.jool.mx/en/run-nat64.html#jool On the NAT64/DNS64 node (leaving NAT64 translation disabled while configuring Jool): ``` /sbin/modprobe jool pool6=64:ff9b::/96 disabled ``` #### Set the pool4 range to use 10.0.2.15 7000-8000: On the NAT64/DNS64 node: ``` jool -4 --add 10.0.2.15 7000-8000 < = = = NOTE: Don't use 5000-6000 on VirtualBox setup ``` #### Check pool4 and pool6: On the NAT64/DNS64 node: ``` [root@kube-master usr]# jool -4 -d 0 TCP 10.0.2.15 7000-8000 0 UDP 10.0.2.15 7000-8000 0 ICMP 10.0.2.15 7000-8000 (Fetched 3 samples.) [root@kube-master usr]# jool -6 -d 64:ff9b::/96 (Fetched 1 entries.) [root@kube-master usr]# ``` #### Enable jool translation: On the NAT64/DNS64 node: ``` jool --enable ``` #### Check jool status: On the NAT64/DNS64 node: ``` jool -d ``` ## Configuring and Verifying NAT64 Operation on Kubernetes Master and Minions #### Enable IPv6 Forwarding On Kubernetes master, minions, and VirtualBox host, make sure that ipv6.conf.all.forwarding is set to 1: ``` sysctl net.ipv6.conf.all.forwarding ``` #### Confirm that the NAT64/DNS64 node is reachable On the Kubernetes master and each Kubernetes minion: ``` ping6 fd00::64 ``` #### Add a static route for the NAT64 subnet 64:ff9b::/64 via eth1 to the NAT64 server On the Kubernetes master and each minion, add the following to /etc/network/interfaces.d/[interface].cfg, if not already present. #### NOTE: This example assumes that the NAT64/DNS64 node is reachable from the kubernetes master and minion nodes via the IPv6 address fd00::64 ``` up ip -6 route add 64:ff9b::/96 via fd00::64 dev eth1 ``` #### Do a ping test using a synthesized NAT64 address From the Kubernetes master and each Kubernetes minion: ``` V4_ADDR=$(host google.com | awk '/has address/{print $4}') ping6 64:ff9b::$V4_ADDR ``` For example: ``` [root@kube-minion-1 ~]# V4_ADDR=$(host google.com | awk '/has address/{print $4}') [root@kube-minion-1 ~]# ping6 64:ff9b::$V4_ADDR PING 64:ff9b::172.217.13.238(64:ff9b::acd9:dee) 56 data bytes 64 bytes from 64:ff9b::acd9:dee: icmp_seq=1 ttl=61 time=32.5 ms 64 bytes from 64:ff9b::acd9:dee: icmp_seq=2 ttl=61 time=33.6 ms 64 bytes from 64:ff9b::acd9:dee: icmp_seq=3 ttl=61 time=36.6 ms 64 bytes from 64:ff9b::acd9:dee: icmp_seq=4 ttl=61 time=34.0 ms 64 bytes from 64:ff9b::acd9:dee: icmp_seq=5 ttl=61 time=43.7 ms . . . ``` ## Installing bind9 (for DNS64 service) on the NAT64/DNS64 Node Reference: [DNS64 Tutorial](https://www.jool.mx/en/dns64.html) On the NAT64/DNS64 node, install bind9: ``` sudo -i apt-get install -y bind9 ``` ## Configuring bind9 on the NAT64/DNS64 Node On the NAT64/DNS64 node, edit the named configuration file for bind9: ``` cd /etc/bind vi named.conf.options ``` In the /etc/bind/named.conf.options file (on the NAT64/DNS64 node), add the following line to enable recursive requests (e.g. from the kube-dns server): ``` allow-query { any; }; ``` In the /etc/bind/named.conf.options file (on the NAT64/DNS64 node), add a forwarder entry for the DNS server that you had been using. DNS64 will forward DNS requests to this server to determine e.g. what IPv4 address should be included in synthesized IPv6 addresses: ``` forwarders { 8.8.8.8; }; ``` In the /etc/bind/named.conf.options file (on the NAT64/DNS64 node), comment out the "dnssec-validation auto;" line: ``` //dnssec-validation auto; ``` In the /etc/bind/named.conf.options file (on the NAT64/DNS64 node), comment out any "listen-on-v6" option, and add a "listen-on-v6 { any; };" if necessary: ``` // listen-on port 53 { 127.0.0.1; }; // listen-on-v6 port 53 { ::1; }; listen-on-v6 { any; }; ``` In the /etc/bind/named.conf.options file (on the NAT64/DNS64 node), add the following option for a DNS64 prefix. Note that the exclude statement will force the DNS64 server to always synthesize IPv6 addresses, even for external dual-stack hosts/servers that have "native" (non-synthesized) IPv6 addresses: ``` # Add prefix for Jool's `pool6` dns64 64:ff9b::/96 { exclude { any; }; } ; ``` ## Restart bind9 service on the NAT64/DNS64 node: ``` service bind9 restart systemctl status bind9 ``` ## On the Kubernetes master and minions, set the host's DNS64 as the DNS server On the Kubernetes master node and each minion node: ``` sed -i "s/nameserver.*/nameserver fd00::64/" /etc/resolv.conf ``` NOTE: On VirtualBox setups, where DHCP is used by default on the eth0 interface, this setting in /etc/resolv.conf may get overwritten periodically when the IP address lease expires. It's recommended to disable DHCP on eth0 in VirtualBox setups. On Ubuntu nodes, DHCP can be disabled by setting a static IPv4 address for eth0 in /etc/network/interfaces, e.g.: ``` auto eth0 iface eth0 inet static address 10.0.2.15 netmask 255.255.255.0 network 10.0.2.0 broadcast 10.0.2.255 ``` ## Testing / Verifying NAT64 with DNS64 #### Debugging DNS64 operation while testing: On the NAT64/DNS64 node, enable real-time journaling output from bind9: ``` sudo journalctl -u bind9 -f ``` #### On kube master and minions, test DNS64 lookup with dig [root@kube-minion-2 ~]# dig hub.docker.com AAAA | grep "AAAA 64" us-east-1-elbdefau-1nlhaqqbnj2z8-140214243.us-east-1.elb.amazonaws.com. 60 IN AAAA 64:ff9b::22c0:3fec us-east-1-elbdefau-1nlhaqqbnj2z8-140214243.us-east-1.elb.amazonaws.com. 60 IN AAAA 64:ff9b::3406:740f us-east-1-elbdefau-1nlhaqqbnj2z8-140214243.us-east-1.elb.amazonaws.com. 60 IN AAAA 64:ff9b::36ae:b1f4 [root@kube-minion-2 ~]# #### On kube master and minions, test NAT64/DNS64 with curl ``` [root@kube-minion-2 ~]# curl -6 -v hub.docker.com * About to connect() to hub.docker.com port 80 (#0) * Trying 64:ff9b::36ae:b1f4... * Connected to hub.docker.com (64:ff9b::36ae:b1f4) port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: hub.docker.com > Accept: */* > < HTTP/1.1 301 Moved Permanently < Location: https://hub.docker.com/ < Content-Length: 0 < Date: Thu, 20 Jul 2017 13:21:37 GMT < Via: 1.1 rtp5-dmz-wsa-1.cisco.com:80 (Cisco-WSA/8.8.0-085) < Connection: keep-alive < * Connection #0 to host hub.docker.com left intact [root@kube-minion-2 ~]# ```
{ "content_hash": "069a6180329621e288116ff345c74255", "timestamp": "", "source": "github", "line_count": 249, "max_line_length": 670, "avg_line_length": 35.096385542168676, "alnum_prop": 0.7187321203799062, "repo_name": "leblancd/kube-v6", "id": "fe7c982df6a725990f2474e58fc812d5269c87b7", "size": "8863", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "NAT64-DNS64-UBUNTU-INSTALL.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "560" }, { "name": "Ruby", "bytes": "5990" }, { "name": "Shell", "bytes": "13962" } ], "symlink_target": "" }
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> </head> <body> <div id="progress"></div> <pre id="output"> </pre> <script> var __total_done = 0; var __total_tests = 0; __karma__ = { start: undefined, result: function(arg) { __total_done++; document.getElementById('progress').innerText = 'Progress: ' + __total_done + ' / ' + __total_tests; if (!arg.success) { document.getElementById('output').innerText += "\nFAILED: " + arg.suite[0] + " " + arg.description; } for (var i = 0; i < arg.log.length; i++) { document.getElementById('output').innerText += "\n " + arg.log[i]; } }, info: function(arg) { __total_tests = arg.total; document.getElementById('progress').innerText = 'Progress: ' + __total_done + ' / ' + __total_tests; document.getElementById('output').innerText += "\nTotal tests: " + arg.total + "\nRunning..."; }, complete: function() { document.getElementById('output').innerText += "\nDone"; } }; <!-- INCLUDE SOURCE PART --> document.getElementById('output').innerText = "Starting..."; setTimeout(function() { __karma__.start(); }, 0); </script> </body> </html>
{ "content_hash": "1aafb1973a000574b9ea433aee265cbb", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 120, "avg_line_length": 37.59090909090909, "alnum_prop": 0.4195888754534462, "repo_name": "Strilanc/Quantum-Circuit-Inspector", "id": "892eb3c06bca25c55b7d5b20e9953ac1ded0feb9", "size": "1654", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test_perf/test_page.template.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "403" }, { "name": "JavaScript", "bytes": "605004" } ], "symlink_target": "" }
///\defgroup etl Embedded Template Library. https://github.com/ETLCPP/etl ///\defgroup containers Containers ///\ingroup etl ///\defgroup utilities Utilities /// A set of utility templates. ///\ingroup etl ///\defgroup maths Maths /// A set of mathematical templates. ///\ingroup etl ///\defgroup patterns Patterns /// A set of templated design patterns. ///\ingroup etl ///\defgroup crc CRC /// A set of CRC calculations ///\ingroup maths ///\ingroup etl namespace etl {}
{ "content_hash": "7eec1be21684aaa3635501d25ca8b41b", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 43, "avg_line_length": 17.25, "alnum_prop": 0.7039337474120083, "repo_name": "GatorQue/etl", "id": "6e1d744c43345fe48cfcf2fa603c501322c070f0", "size": "1777", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "doxygen.h", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "10270" }, { "name": "Batchfile", "bytes": "1395" }, { "name": "C", "bytes": "179864" }, { "name": "C++", "bytes": "1622988" }, { "name": "HTML", "bytes": "1665" } ], "symlink_target": "" }
package org.kasource.web.websocket.client; import org.kasource.web.websocket.protocol.ProtocolHandler; /** * WebSocketClient that one can send messages to. * * @author rikardwi **/ public interface WebSocketClient { public void sendBinaryMessageToSocket(Object message); public void sendTextMessageToSocket(Object message); /** * @return the username */ public String getUsername(); /** * @return the Upgrdade (connection) request */ public HandshakeRequestData getUpgradeRequest(); public ProtocolHandler<String> getTextProtocolHandler(); public ProtocolHandler<byte[]> getBinaryProtocolHandler(); /** * @return the id */ public String getId(); }
{ "content_hash": "93f5a4e0747420eabf480ea5ce072b8e", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 62, "avg_line_length": 21.8, "alnum_prop": 0.6657929226736566, "repo_name": "wigforss/Ka-Websocket", "id": "d9a2cea883fbde4a5839725f0189fc6b2131e60a", "size": "763", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/src/main/java/org/kasource/web/websocket/client/WebSocketClient.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "23326" }, { "name": "Java", "bytes": "408278" } ], "symlink_target": "" }
package org.apache.ignite.cache.store.jdbc; import org.apache.ignite.cache.*; import org.apache.ignite.cache.store.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*; import javax.cache.*; import javax.cache.integration.*; import java.lang.reflect.*; import java.sql.*; import java.util.*; /** * Implementation of {@link CacheStore} backed by JDBC and POJO via reflection. * * This implementation stores objects in underlying database using java beans mapping description via reflection. * <p> * Use {@link CacheJdbcPojoStoreFactory} factory to pass {@link CacheJdbcPojoStore} to {@link CacheConfiguration}. */ public class CacheJdbcPojoStore<K, V> extends CacheAbstractJdbcStore<K, V> { /** * POJO methods cache. */ protected static class PojoMethodsCache { /** POJO class. */ protected final Class<?> cls; /** Constructor for POJO object. */ private Constructor ctor; /** {@code true} if object is a simple type. */ private final boolean simple; /** Cached setters for POJO object. */ private Map<String, Method> getters; /** Cached getters for POJO object. */ private Map<String, Method> setters; /** * POJO methods cache. * * @param clsName Class name. * @param fields Fields. * * @throws CacheException If failed to construct type cache. */ public PojoMethodsCache(String clsName, Collection<CacheTypeFieldMetadata> fields) throws CacheException { try { cls = Class.forName(clsName); if (simple = simpleType(cls)) return; ctor = cls.getDeclaredConstructor(); if (!ctor.isAccessible()) ctor.setAccessible(true); } catch (ClassNotFoundException e) { throw new CacheException("Failed to find class: " + clsName, e); } catch (NoSuchMethodException e) { throw new CacheException("Failed to find default constructor for class: " + clsName, e); } setters = U.newHashMap(fields.size()); getters = U.newHashMap(fields.size()); for (CacheTypeFieldMetadata field : fields) { String prop = capitalFirst(field.getJavaName()); try { getters.put(field.getJavaName(), cls.getMethod("get" + prop)); } catch (NoSuchMethodException ignored) { try { getters.put(field.getJavaName(), cls.getMethod("is" + prop)); } catch (NoSuchMethodException e) { throw new CacheException("Failed to find getter in POJO class [clsName=" + clsName + ", prop=" + field.getJavaName() + "]", e); } } try { setters.put(field.getJavaName(), cls.getMethod("set" + prop, field.getJavaType())); } catch (NoSuchMethodException e) { throw new CacheException("Failed to find setter in POJO class [clsName=" + clsName + ", prop=" + field.getJavaName() + "]", e); } } } /** * Capitalizes the first character of the given string. * * @param str String. * @return String with capitalized first character. */ @Nullable private String capitalFirst(@Nullable String str) { return str == null ? null : str.isEmpty() ? "" : Character.toUpperCase(str.charAt(0)) + str.substring(1); } } /** Methods cache. */ protected volatile Map<String, Map<String, PojoMethodsCache>> mtdsCache = Collections.emptyMap(); /** {@inheritDoc} */ @Override protected void prepareBuilders(@Nullable String cacheName, Collection<CacheTypeMetadata> types) throws CacheException { Map<String, PojoMethodsCache> typeMethods = U.newHashMap(types.size() * 2); for (CacheTypeMetadata type : types) { String keyType = type.getKeyType(); typeMethods.put(keyType, new PojoMethodsCache(keyType, type.getKeyFields())); String valType = type.getValueType(); typeMethods.put(valType, new PojoMethodsCache(valType, type.getValueFields())); } Map<String, Map<String, PojoMethodsCache>> newMtdsCache = new HashMap<>(mtdsCache); newMtdsCache.put(cacheName, typeMethods); mtdsCache = newMtdsCache; } /** {@inheritDoc} */ @Override protected <R> R buildObject(String cacheName, String typeName, Collection<CacheTypeFieldMetadata> fields, Map<String, Integer> loadColIdxs, ResultSet rs) throws CacheLoaderException { PojoMethodsCache mc = mtdsCache.get(cacheName).get(typeName); if (mc == null) throw new CacheLoaderException("Failed to find cache type metadata for type: " + typeName); try { if (mc.simple) { CacheTypeFieldMetadata field = F.first(fields); return (R)getColumnValue(rs, loadColIdxs.get(field.getDatabaseName()), mc.cls); } Object obj = mc.ctor.newInstance(); for (CacheTypeFieldMetadata field : fields) { String fldJavaName = field.getJavaName(); Method setter = mc.setters.get(fldJavaName); if (setter == null) throw new IllegalStateException("Failed to find setter in POJO class [clsName=" + typeName + ", prop=" + fldJavaName + "]"); String fldDbName = field.getDatabaseName(); Integer colIdx = loadColIdxs.get(fldDbName); try { setter.invoke(obj, getColumnValue(rs, colIdx, field.getJavaType())); } catch (Exception e) { throw new IllegalStateException("Failed to set property in POJO class [clsName=" + typeName + ", prop=" + fldJavaName + ", col=" + colIdx + ", dbName=" + fldDbName + "]", e); } } return (R)obj; } catch (SQLException e) { throw new CacheLoaderException("Failed to read object of class: " + typeName, e); } catch (Exception e) { throw new CacheLoaderException("Failed to construct instance of class: " + typeName, e); } } /** {@inheritDoc} */ @Nullable @Override protected Object extractParameter(String cacheName, String typeName, String fieldName, Object obj) throws CacheException { try { PojoMethodsCache mc = mtdsCache.get(cacheName).get(typeName); if (mc == null) throw new CacheException("Failed to find cache type metadata for type: " + typeName); if (mc.simple) return obj; Method getter = mc.getters.get(fieldName); if (getter == null) throw new CacheLoaderException("Failed to find getter in POJO class [clsName=" + typeName + ", prop=" + fieldName + "]"); return getter.invoke(obj); } catch (Exception e) { throw new CacheException("Failed to read object of class: " + typeName, e); } } /** {@inheritDoc} */ @Override protected Object keyTypeId(Object key) throws CacheException { return key.getClass(); } /** {@inheritDoc} */ @Override protected Object keyTypeId(String type) throws CacheException { try { return Class.forName(type); } catch (ClassNotFoundException e) { throw new CacheException("Failed to find class: " + type, e); } } }
{ "content_hash": "b9638a2299d52cadf12c4e4f618890e8", "timestamp": "", "source": "github", "line_count": 226, "max_line_length": 119, "avg_line_length": 35.89823008849557, "alnum_prop": 0.570072722790583, "repo_name": "svladykin/ignite", "id": "1ff170ef71b257647a3926cb97f2eba39f716bce", "size": "8915", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "31291" }, { "name": "C#", "bytes": "7001" }, { "name": "C++", "bytes": "28098" }, { "name": "CSS", "bytes": "17517" }, { "name": "Groovy", "bytes": "15102" }, { "name": "HTML", "bytes": "4669" }, { "name": "Java", "bytes": "18537522" }, { "name": "JavaScript", "bytes": "1085" }, { "name": "PHP", "bytes": "11079" }, { "name": "Scala", "bytes": "653258" }, { "name": "Shell", "bytes": "392571" } ], "symlink_target": "" }
// Copyright (c) 2014 blinkbox Entertainment Limited. All rights reserved. package com.blinkboxbooks.android.authentication; import android.app.Service; import android.content.Intent; import android.os.IBinder; /** * Authentication service allowing users to authenticate and login to accounts from outside the application */ public class BBBAuthenticationService extends Service { private BBBAuthenticator mAuthenticator; @Override public void onCreate() { mAuthenticator = new BBBAuthenticator(getApplicationContext()); } @Override public IBinder onBind(Intent intent) { return mAuthenticator.getIBinder(); } }
{ "content_hash": "56355e7cafe59b039c6f884cacb4fcc8", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 107, "avg_line_length": 27.583333333333332, "alnum_prop": 0.7552870090634441, "repo_name": "blinkboxbooks/android-app", "id": "5d23955e37229bff605acdfa77553a39278cb28e", "size": "662", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/com/blinkboxbooks/android/authentication/BBBAuthenticationService.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "1478801" }, { "name": "Python", "bytes": "7500" }, { "name": "Shell", "bytes": "11274" } ], "symlink_target": "" }
package org.vertx.java.test.utils; import java.util.HashSet; import java.util.Set; import java.util.concurrent.CountDownLatch; import org.vertx.java.core.Handler; /** * @author swilliams * */ public class DeploymentHandler implements Handler<String> { private final CountDownLatch latch; private final Set<String> deploymentIDs = new HashSet<>(); public DeploymentHandler(final CountDownLatch latch) { this.latch = latch; } @Override public void handle(String event) { if (event != null) { deploymentIDs.add(event); } latch.countDown(); } public String getDeploymentID() { if (deploymentIDs.size() == 0) { return null; } return deploymentIDs.iterator().next(); } }
{ "content_hash": "d1e72318a1dd8e126418e81270d0ec66", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 60, "avg_line_length": 18.4, "alnum_prop": 0.6847826086956522, "repo_name": "bytor99999/vertx-junit-annotations", "id": "0bbd7d293b03e79196b24771c5e78116657eae40", "size": "1350", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/main/java/org/vertx/java/test/utils/DeploymentHandler.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Groovy", "bytes": "5314" }, { "name": "Java", "bytes": "59306" }, { "name": "JavaScript", "bytes": "8833" }, { "name": "Shell", "bytes": "5079" } ], "symlink_target": "" }
sudo apt-get install --only-upgrade linux=3.2.84-1 -y
{ "content_hash": "f7f11c95ff757e697f7b9ea6b4a9ba07", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 53, "avg_line_length": 54, "alnum_prop": 0.7222222222222222, "repo_name": "Cyberwatch/cbw-security-fixes", "id": "0739193bfadc5842ac96d925e1e7a306afab1c30", "size": "617", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Debian_7_(Wheezy)/x86_64/2015/DSA-3372-1.sh", "mode": "33188", "license": "mit", "language": [ { "name": "Shell", "bytes": "26564468" } ], "symlink_target": "" }
/************************************************************************ * * Flood Project © (2008-201x) * Licensed under the simplified BSD license. All rights reserved. * ************************************************************************/ #pragma once #include "CppSharp.h" #include <Core/Math/BoundingBox.h> #include "Vector.h" namespace Flood { value struct BoundingBox; value struct Matrix4x3; value struct Ray; } namespace Flood { /// <summary> /// Axis-aligned Bounding Box. /// </summary> public value struct BoundingBox { public: BoundingBox(::BoundingBox* native); BoundingBox(System::IntPtr native); BoundingBox(Flood::Vector3 min, Flood::Vector3 max); property Flood::Vector3 Center { Flood::Vector3 get(); } Flood::Vector3 Min; Flood::Vector3 Max; void Add(Flood::Vector3 vertex); void Add(Flood::BoundingBox box); void Reset(); void SetZero(); bool IsInfinite(); Flood::Vector3 GetCorner(int index); bool Intersects(Flood::Ray ray, [System::Runtime::InteropServices::Out] float% distance); Flood::BoundingBox Transform(Flood::Matrix4x3 _0); }; }
{ "content_hash": "be586a631b5990a158ec85b84120cb03", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 97, "avg_line_length": 22.12280701754386, "alnum_prop": 0.5440126883425852, "repo_name": "FloodProject/flood", "id": "41f97d7c3b623574a121b3c6c33fa186ed0b5f97", "size": "1262", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/EngineManaged/Bindings/BoundingBox.h", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Batchfile", "bytes": "966" }, { "name": "C", "bytes": "18064" }, { "name": "C#", "bytes": "1918184" }, { "name": "C++", "bytes": "2321379" }, { "name": "GLSL", "bytes": "8502" }, { "name": "Lua", "bytes": "29282" }, { "name": "Objective-C", "bytes": "3351" } ], "symlink_target": "" }
$( document ).ready(function() { // statement here });
{ "content_hash": "0da8a0dab5f8a6b5a799a7af303224aa", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 32, "avg_line_length": 18.666666666666668, "alnum_prop": 0.6071428571428571, "repo_name": "genessadesign/intro", "id": "1b3e8b21eae7a014b1d0d1a2285eb14be03cf135", "size": "56", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "js/008.4-jquery.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "70" }, { "name": "HTML", "bytes": "55683" }, { "name": "JavaScript", "bytes": "681" } ], "symlink_target": "" }
import React, { FunctionComponent, useState } from 'react'; import { Box, Button, FormControl, FormErrorMessage, Input, InputProps, Modal, ModalOverlay, ModalContent, ModalCloseButton, ModalHeader, ModalBody, Heading } from '@chakra-ui/react'; import { Formik, Form, Field, FormikState, FormikHelpers } from 'formik'; import { IoLogoGoogle } from 'react-icons/io5'; import { getConfig } from '../lib/config'; type BaseInputRenderProps<T> = { field: InputProps; form: FormikState<T> }; type LoginValues = { username: string; password: string }; type LoginInputRenderProps = BaseInputRenderProps<LoginValues>; type ForgotPasswordValues = { email: string }; type ForgotPasswordInputRenderProps = BaseInputRenderProps<ForgotPasswordValues>; interface LoginModalProps { isOpen: boolean; onClose: () => void; } enum Mode { Login, ForgotPassword, ForgotPasswordDone } export const LoginModal: FunctionComponent<LoginModalProps> = ({ isOpen, onClose }: LoginModalProps) => { const [mode, setMode] = useState<Mode>(Mode.Login); const googleRedirect = () => { window.location.pathname = '/auth/google'; }; const handleLogin = async (values: LoginValues, actions: FormikHelpers<LoginValues>) => { let data; try { const response = await fetch('/api/v1/login', { method: 'POST', headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify({ username: values.username, password: values.password }), credentials: 'include' }); data = await response.json(); } catch (e) { actions.setErrors({ password: 'Network error. Please try again later.' }); return; } if (data.success) { // Server has set the session cookie, just redirect window.location.pathname = '/app/'; } else { actions.setErrors({ password: data.msg }); } }; const handleForgotPassword = async (values: ForgotPasswordValues, actions: FormikHelpers<ForgotPasswordValues>) => { let data; try { const response = await fetch('/api/v1/forgot-password', { method: 'POST', headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify({ email: values.email }), credentials: 'include' }); data = await response.json(); } catch (e) { actions.setErrors({ email: 'Network error. Please try again later.' }); return; } if (data.success) { setMode(Mode.ForgotPasswordDone); } else { actions.setErrors({ email: 'Something went wrong' }); } }; const AuthButtons = getConfig().auth.google ? ( <Box mt={8}> <Heading size="sm">Sign in with an existing account</Heading> <Button mt={4} width="100%" onClick={googleRedirect} leftIcon={<IoLogoGoogle />}> Google Account </Button> </Box> ) : null; const loginPanel = mode === Mode.Login && ( <Box> <Heading size="sm">Sign in with a password</Heading> <Formik initialValues={{ username: '', password: '' }} onSubmit={handleLogin}> {formProps => ( <Form> <Field name="username"> {({ field, form }: LoginInputRenderProps) => ( <FormControl mt={4} isInvalid={!!form.errors.username}> <Input {...field} id="username" placeholder="Username or email" /> <FormErrorMessage>{form.errors.username}</FormErrorMessage> </FormControl> )} </Field> <Field name="password"> {({ field, form }: LoginInputRenderProps) => ( <FormControl mt={4} isInvalid={Boolean(form.errors.password)}> <Input {...field} type="password" id="password" placeholder="Password" /> <FormErrorMessage>{form.errors.password}</FormErrorMessage> </FormControl> )} </Field> <Button mt={4} width="100%" isLoading={formProps.isSubmitting} type="submit"> Enter </Button> <Button mt={4} width="100%" variant="link" onClick={() => setMode(Mode.ForgotPassword)}> Forgot password? </Button> </Form> )} </Formik> {AuthButtons} </Box> ); const forgotPasswordPanel = mode === Mode.ForgotPassword && ( <Box> <Heading size="sm">Start the recovery</Heading> <Formik initialValues={{ email: '' }} onSubmit={handleForgotPassword}> {formProps => ( <Form> <Field name="email"> {({ field, form }: ForgotPasswordInputRenderProps) => ( <FormControl mt={4}> <Input {...field} id="email" placeholder="Your email address" /> <FormErrorMessage>{form.errors.email}</FormErrorMessage> </FormControl> )} </Field> <Button mt={4} width="100%" isLoading={formProps.isSubmitting} type="submit"> Proceed </Button> </Form> )} </Formik> <Button mt={8} width="100%" variant="link" onClick={() => setMode(Mode.Login)}> Back to sign in </Button> </Box> ); const forgotPasswordDonePanel = mode === Mode.ForgotPasswordDone && ( <Box> <Box>Password reset email is now sent if the email address you gave matches a MAS user!</Box> <Box mt={4}>See your spam folder if you don&apos;t see it in couple minutes.</Box> <Button mt={8} width="100%" onClick={() => setMode(Mode.Login)}> Ok </Button> </Box> ); const title = mode === Mode.Login ? 'Sign in' : mode === Mode.ForgotPassword ? 'Reset your password' : 'Done'; return ( <Modal isOpen={isOpen} onClose={onClose} isCentered size="xs"> <ModalOverlay /> <ModalContent> <ModalHeader>{title}</ModalHeader> <ModalCloseButton /> <ModalBody px={8} pt={4} pb={8}> {loginPanel} {forgotPasswordPanel} {forgotPasswordDonePanel} </ModalBody> </ModalContent> </Modal> ); };
{ "content_hash": "988e884a39b351654dea8308f5eacd23", "timestamp": "", "source": "github", "line_count": 190, "max_line_length": 118, "avg_line_length": 32.44210526315789, "alnum_prop": 0.5872809863724854, "repo_name": "ilkkao/mas", "id": "f369cd213ef461d7edeea39dafe1af418e99cdfd", "size": "6164", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "website/src/components/LoginModal.tsx", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "27259" }, { "name": "Dockerfile", "bytes": "1406" }, { "name": "HTML", "bytes": "41052" }, { "name": "JavaScript", "bytes": "381620" }, { "name": "Shell", "bytes": "4975" }, { "name": "TypeScript", "bytes": "34235" } ], "symlink_target": "" }
<!DOCTYPE html> <html> <head> <title> Christopher Hui's Blog</title> <link href='http://fonts.googleapis.com/css?family=Poiret+One' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Raleway:300' rel='stylesheet' type='text/css'> <link rel ="stylesheet" type="text/css" href="../stylesheets/blog-stylesheet.css"> </head> <body> <div class="header"> <p>CHRISTOPHER HUI</p> <h1>Student @ Dev Bootcamp</h1> </div> <ul> <li><a href="../index.html">Home</a></li> <li><a href="../about-me.html">About Me </a></li> <li><a href="../blog-posts/blog-page.html">Blog </a></li> <li><a href="#">Contact Me</a></li> </ul> <hr> <div class="body"> <h1 id="blog-title">Blog #14: Review: Blogs</h1> <p id="blog-date">10/13/2014<br>2:56 PM</p> <p class="paragraph">During Dev Bootcamp’s Phase 0, students were required to blog at least twice a week. One blog post was devoted to technical topics and the other post was devoted to cultural topics chosen by Dev Bootcamp. Our blogs and blog websites were designed early on during Unit 1 of Phase 0, so our HTML/CSS skills were pretty rough in the beginning. Now that I’ve been blogging for over 7 weeks now, I have learned some new skills and found some weaknesses in my knowledge. </p> <p class="paragraph">I found that blogging helped supplement my technical skills. The technical blog often required me to do extra reading and research on coding topics. It made sure I understood the topics to a level where I could translate my thoughts into sentences. Often times it was difficult to time box my blog posts to an hour. The research alone took a significant amount of time and putting that knowledge into words took a while as well. Blogging helped challenge me in a different way writing code does. Writing the actual code helps me understand how code is used, but blogging helps me understand what the code is doing and how it can be used differently. Hopefully that makes sense. Blogging allowed me to have a deeper understand of the code I was writing.</p> <p class="paragraph">When I revisited my blog page, I knew what the page looked like. I knew that it was very basic because I made it during the earlier weeks of Phase 0. Over the past 7 weeks of blogging, I never noticed how plain and simple the page was. I was numbed by the characteristics of the page. Getting feedback from my friends helped me to see what can be improved on my page. They helped point out obvious flaws that I was numb to because I had been using the page for so long. Hearing the feedback was constructive and helped me think of ideas on how I could improve the page. </p> <p class="paragraph">Unfortunately, those ideas were difficult to implement because my lack of practice in HTML/CSS. During Phase 0, we jumped from from HTML/CSS, to JavaScript, to Ruby, and lastly onto SQL. These weeks during Phase 0 greatly improved my technical skills, but my HTML/CSS skills have had little improvement after Unit 1. This made implementing changes difficult, because I was not refining those skills throughout the weeks. I was focused on the tasks that were in front of me. With that said, that made the process of this challenge difficult. I am not finished with these changes to my website and will not be anytime soon. I see this project as a work in progress that will continue even after graduation from Dev Bootcamp. I hope that I was able to improve my website/blog to the best of my ability to satisfy this challenge.</p> </div> <div id="footer"> <a href="https://www.facebook.com/christopherhui"> <img src="../imgs/facebook.png" /></a> <a href="https://www.twitter.com/ChristopherHui"> <img src="../imgs/twitter.png" /></a> <a href="https://www.linkedin.com/pub/christopher-hui/9b/1a9/28a"> <img src="../imgs/linkedin.png" /></a> <a href="https://www.github.com/christopherhuii"> <img src="../imgs/github.png" /></a> </div> </body> </html>
{ "content_hash": "f2b57158b7d3432b4a240e86abfa0e4d", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 856, "avg_line_length": 93.02222222222223, "alnum_prop": 0.7161968466316292, "repo_name": "christopherhuii/christopherhuii.github.io", "id": "f83710d2d926b6a38f5ee3a82a420bf79d06c22b", "size": "4190", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "blog-posts/week8_html_blog.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "15252" }, { "name": "HTML", "bytes": "118182" }, { "name": "JavaScript", "bytes": "750" } ], "symlink_target": "" }
<?php namespace DmTest\ServiceManager; use Zend\ServiceManager\Exception\ServiceNotFoundException; use Zend\ServiceManager\ServiceLocatorInterface; class ServiceLocatorDummy implements ServiceLocatorInterface { const CREATE_NOTHING = 0; const CREATE_CLASS = 1; const CREATE_ABSTRACT_CLASS = 2; const CREATE_INTERFACE = 3; const CREATE_TRAIT = 4; /** @var array */ private $values = []; /** @var \PHPUnit_Framework_TestCase */ private $testCase; /** * @param \PHPUnit_Framework_TestCase $testCase */ public function __construct(\PHPUnit_Framework_TestCase $testCase) { $this->testCase = $testCase; } /** * Retrieve a registered instance * * @param string $name * @param mixed $value * @param int $create * * @throws ServiceNotFoundException * @return mixed */ public function set($name, $value = null, $create = self::CREATE_CLASS) { if (null === $value && $create != self::CREATE_NOTHING) { $mockBuilder = new \PHPUnit_Framework_MockObject_MockBuilder($this->testCase, $name); $mockBuilder->disableOriginalConstructor(); switch ($create) { case self::CREATE_ABSTRACT_CLASS: $value = $mockBuilder->getMockForAbstractClass(); break; case self::CREATE_TRAIT: $value = $mockBuilder->getMockForTrait(); break; default: $value = $mockBuilder->getMock(); } } $this->values[$name] = $value; return $this; } /** * Retrieve a registered instance * * @param string $name * * @throws ServiceNotFoundException * @return mixed */ public function get($name, $create = self::CREATE_CLASS) { if (!array_key_exists($name, $this->values)) { if ($create != self::CREATE_NOTHING) { $this->set($name, null, $create); } else { throw new ServiceNotFoundException(); } } return $this->values[$name]; } /** * Check for a registered instance * * @param string|array $name * * @return bool */ public function has($name) { return array_key_exists($name, $this->values); } }
{ "content_hash": "ad216be00bdd8df5723fa03bd707178a", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 97, "avg_line_length": 25.197916666666668, "alnum_prop": 0.5489871847871021, "repo_name": "peteraba/dermailer", "id": "3f996182d945c7b02302adedeb3075306a7cad9c", "size": "2419", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "vendor/peteraba/dm-test/src/DmTest/ServiceManager/ServiceLocatorDummy.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ApacheConf", "bytes": "711" }, { "name": "CSS", "bytes": "11469" }, { "name": "HTML", "bytes": "26671" }, { "name": "JavaScript", "bytes": "70149" }, { "name": "PHP", "bytes": "66063" }, { "name": "Shell", "bytes": "33630" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <oval_definitions xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5"> <generator> <oval:schema_version>5.10.1</oval:schema_version> <oval:timestamp>2009-01-12T10:41:00-05:00</oval:timestamp> <terms_of_use>Copyright (c) 2002-2013, The MITRE Corporation. All rights reserved. The contents of this file are subject to the license described in terms.txt.</terms_of_use> </generator> <definitions> <definition id="oval:org.mitre.oval.test:def:485" version="1" class="miscellaneous"> <metadata> <title>Evaluate to true if the ind-def:sql_test is properly supported</title> <description>This definition is intended to evalutate to true if the interpreter properly supports the ind-def:sql_test.</description> </metadata> <notes> <note>It is important to note that the values used in this test definition are not real and will need to be modified to match the information specific to tha database being queried.</note> </notes> <criteria operator="AND"> <criterion comment="Test that the sql_object is supported with the engine, version, connection_string, and sql entities equal to some value." test_ref="oval:org.mitre.oval.test:tst:1598"/> </criteria> </definition> </definitions> <tests> <sql_test id="oval:org.mitre.oval.test:tst:1598" version="1" comment="Test that the sql_object is supported with the engine, version, connection_string, and sql entities equal to some value." check_existence="at_least_one_exists" check="at least one" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"> <object object_ref="oval:org.mitre.oval.test:obj:1112"/> <state state_ref="oval:org.mitre.oval.test:ste:1128"/> </sql_test> </tests> <objects> <sql_object id="oval:org.mitre.oval.test:obj:1112" version="1" comment="This sql_object collects the sql_item(s) where the engine entity equals 'postgre', the version entity equals '9.0', the connection_string equals 'DRIVER={PostgreSQL};DATABASE=database;SERVER=server;UID=username;PWD=password;', and the sql entity equals 'SELECT column FROM table'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"> <engine>postgre</engine> <version>9.0</version> <connection_string>DRIVER={PostgreSQL};DATABASE=database;SERVER=server;UID=username;PWD=password;</connection_string> <sql>SELECT column FROM table</sql> </sql_object> </objects> <states> <sql_state id="oval:org.mitre.oval.test:ste:1128" version="1" comment="This sql_state represents a sql_item that has a engine that equals 'postgre' and a result that matches the regular expression '.*'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"> <engine>postgre</engine> <result operation="pattern match">.*</result> </sql_state> </states> </oval_definitions>
{ "content_hash": "e7621b32ca87c0a9fd50652c42077dca", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 540, "avg_line_length": 80.73809523809524, "alnum_prop": 0.7283987024476556, "repo_name": "nakamura5akihito/opensec-oval", "id": "b1083e9dbec366a9d4a873e088e401b5b6af9358", "size": "3391", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/test/resources/data/oval/oval-test-content_5_10_1_3/solaris/ind-def_sql_test.xml", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "159336" }, { "name": "Java", "bytes": "4301821" }, { "name": "XSLT", "bytes": "66206" } ], "symlink_target": "" }
@interface IntroFTUEViewController () @property (readonly) RACSubject *completed; @end @implementation IntroFTUEViewController - (id)init { self = [super init]; if (!self) return nil; _completed = [RACSubject subject]; return self; } - (IBAction)didTapButton:(id)sender { [_completed sendNext:self]; [_completed sendCompleted]; } @end
{ "content_hash": "24402cbbfcdfbece6770455b5eca8b10", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 43, "avg_line_length": 16.636363636363637, "alnum_prop": 0.6857923497267759, "repo_name": "leojkwan/cortado", "id": "8519aedddc39b778e21bd77e2f88da099d71139a", "size": "444", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "Cortado/View Controllers/FTUE/IntroFTUEViewController.m", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "13494" }, { "name": "JavaScript", "bytes": "2984" }, { "name": "Objective-C", "bytes": "181556" }, { "name": "Ruby", "bytes": "1649" } ], "symlink_target": "" }
/*************************************************************************** * Xiayu Wang * x9wang@ucsd.edu * * ***************************************************************************/ #ifndef CUARRAY_IMPL #define CUARRAY_IMPL #include <device_memblock.h> #include <idxvector.h> #include <range.h> #include <string> #include <assignment.h> namespace cuda_array { template<typename T_numtype, int N_rank> class cuArray : public deviceMemoryBlockReference<T_numtype> { public: typedef T_numtype T; private: typedef deviceMemoryBlockReference<T_numtype> Memblock; using Memblock::data_; using Memblock::changeToNullBlock; using Memblock::numReferences; protected: IdxVector<int, N_rank> length_; IdxVector<int, N_rank> stride_; inline void computeStrides() //helper function { int current_stride = 1; for (int n=0; n<N_rank; n++) { stride_[n] = current_stride; current_stride *= length_[n]; } } inline void setupStorage(int lastRank) //helper function { for (int i=lastRank + 1; i < N_rank; ++i) length_[i] = length_[lastRank]; computeStrides(); int numElem = product(length_); if (numElem==0) deviceMemoryBlockReference<T_numtype>::changeToNullBlock(); else deviceMemoryBlockReference<T_numtype>::newBlock(numElem); } public: typedef IdxVector<int, N_rank> T_index; typedef cuArray<T_numtype, N_rank> T_array; cuArray() { length_=0; stride_=0; } explicit cuArray(int length0) { length_[0] = length0; setupStorage(0); } cuArray(int length0, int length1) { length_[0] = length0; length_[1] = length1; setupStorage(1); } cuArray(int length0, int length1, int length2) { length_[0] = length0; length_[1] = length1; length_[2] = length2; setupStorage(2); } cuArray(int length0, int length1, int length2, int length3) { length_[0] = length0; length_[1] = length1; length_[2] = length2; length_[3] = length3; setupStorage(3); } cuArray(T_numtype* data, IdxVector<int, N_rank> shape) : deviceMemoryBlockReference<T_numtype>(product(shape), data, neverDeleteData) { length_ = shape; computeStrides(); } cuArray(T_numtype* data, IdxVector<int, N_rank> shape, preexistingMemoryPolicy deletionPolicy) : deviceMemoryBlockReference<T_numtype>(product(shape), data, deletionPolicy) { length_ = shape; computeStrides(); if (deletionPolicy == duplicateData) reference(copy()); } cuArray(const IdxVector<int, N_rank>& extent) { length_ = extent; setupStorage(N_rank - 1); } // copy constructor cuArray(const cuArray<T_numtype, N_rank>& array) : deviceMemoryBlockReference<T_numtype>() { reference(const_cast<T_array&>(array)); } #include <slice.cpp> ////////////////////////////////////////////// // Member functions ////////////////////////////////////////////// __host__ __device__ int cols() const { return length_[1]; } int columns() const { return length_[1]; } T_array copy() const { int siz = numElements(); if (siz) { cuArray<T_numtype, N_rank> temp(length_); cutilSafeCall( cudaMemcpy(temp.data_, data_, sizeof(T_numtype)*siz, cudaMemcpyDeviceToDevice) ); return temp; } else { return *this; } } T_array copyAsync(cudaStream_t copyStream) const { int siz = numElements(); if (siz) { cuArray<T_numtype, N_rank> temp(length_); cutilSafeCall( cudaMemcpyAsync(temp.data_, data_, sizeof(T_numtype)*siz, cudaMemcpyDeviceToDevice, copyStream) ); return temp; } else { return *this; } } void copyfromHost(T_numtype* host_ptr) { cutilSafeCall( cudaMemcpy(data_, host_ptr, sizeof(T_numtype)*numElements(), cudaMemcpyHostToDevice)); } void copytoHost(T_numtype* host_ptr) { cutilSafeCall( cudaMemcpy(host_ptr, data_, sizeof(T_numtype)*numElements(), cudaMemcpyDeviceToHost)); } void copyfromHostAsync(T_numtype* pinned_host_ptr, cudaStream_t stream) { cutilSafeCall( cudaMemcpyAsync(data_, pinned_host_ptr, sizeof(T_numtype)*numElements(), cudaMemcpyHostToDevice, stream)); } void copytoHostAsync(T_numtype* pinned_host_ptr, cudaStream_t stream) { cutilSafeCall( cudaMemcpy(pinned_host_ptr, data_, sizeof(T_numtype)*numElements(), cudaMemcpyDeviceToHost, stream)); } __host__ __device__ const T_numtype* data() const { return data_; } __host__ __device__ T_numtype* data() { return data_; } __host__ __device__ int depth() const { return length_[2]; } __host__ __device__ int dimensions() const { return N_rank; } // void dump_hdf5(std::string filename, string fieldname) const; const IdxVector<int,N_rank>& extent() const { return length_; } void free() { changeToNullBlock(); length_ = 0; } __host__ __device__ int length(int rank) const { return length_[rank]; } const IdxVector<int, N_rank>& length() const { return length_; } __host__ __device__ int numElements() const { return product(length_); } __host__ __device__ IdxVector<int, N_rank> position(int index) const { IdxVector<int, N_rank> pos; int current_slice = index; for (int rank=N_rank-1; rank>=0; rank--) { pos[rank] = current_slice/stride_[rank]; current_slice -= pos[rank]*stride_[rank]; } return pos; } int rank() const { return N_rank; } void reference(const T_array& cuarray) { length_ = cuarray.length_; stride_ = cuarray.stride_; deviceMemoryBlockReference<T_numtype>::changeBlock(const_cast<T_array&>( cuarray)); } // resize cuArray, implemented in resize.cpp void resize(int extent); void resize(int extent1, int extent2); void resize(int extent1, int extent2, int extent3); void resize(int extent1, int extent2, int extent3, int extent4); void resize(Range r1); void resize(Range r1, Range r2); void resize(Range r1, Range r2, Range r3); void resize(Range r1, Range r2, Range r3, Range r4); __host__ __device__ int rows() const { return length_[0]; } __host__ __device__ const IdxVector<int, N_rank>& shape() const { return length_; } __host__ __device__ int size() const { return numElements(); } __host__ __device__ int stride(int rank) const { return stride_[rank]; } ////////////////////////////////////////////// // Subscripting operators ////////////////////////////////////////////// __host__ __device__ const T_numtype& operator[](int i0) const { return data_[i0]; } __host__ __device__ T_numtype& operator[](int i0) { return data_[i0]; } template<int N_rank2> __host__ __device__ const T_numtype& operator()(const IdxVector<int,N_rank2>& index) const { return data_[dot(index, stride_)]; } template<int N_rank2> __host__ __device__ T_numtype& operator()(const IdxVector<int,N_rank2>& index) { return data_[dot(index, stride_)]; } __host__ __device__ const T_numtype& operator()(int i0) const { return data_[i0 * stride_[0]]; } __host__ __device__ T_numtype& operator()(int i0) { return data_[i0 * stride_[0]]; } __host__ __device__ const T_numtype& operator()(int i0, int i1) const { return data_[i0 * stride_[0] + i1 * stride_[1]]; } __host__ __device__ T_numtype& operator()(int i0, int i1) { return data_[i0 * stride_[0] + i1 * stride_[1]]; } const T_numtype& operator()(int i0, int i1, int i2) const { return data_[i0 * stride_[0] + i1 * stride_[1] + i2 * stride_[2]]; } T_numtype& operator()(int i0, int i1, int i2) { return data_[i0* stride_[0] + i1 * stride_[1] + i2 * stride_[2]]; } const T_numtype& operator()(int i0, int i1, int i2, int i3) const { return data_[i0 * stride_[0] + i1 * stride_[1] + i2 * stride_[2] + i3 * stride_[3]]; } T_numtype& operator()(int i0, int i1, int i2, int i3) { return data_[i0 * stride_[0] + i1 * stride_[1] + i2 * stride_[2] + i3 * stride_[3]]; } template<class Expr> T_array& operator = (Expr exp) { int BLOCKS = numElements()/THREADS+1; assign<<<BLOCKS, THREADS>>>(*this, exp); return *this; } T_array& operator = (T_array& rhs) { cutilSafeCall(cudaMemcpy(data_, rhs.data_, sizeof(T_numtype)*numElements(), cudaMemcpyDeviceToDevice) ); return *this; } template<class Expr> T_array& operator += (Expr exp) { int BLOCKS = numElements()/THREADS+1; update_add<<<BLOCKS/BLOCK_UNIT_SIZE+1, THREADS>>>(*this, exp); return *this; } template<class Expr> T_array& operator -= (Expr exp) { int BLOCKS = numElements()/THREADS+1; update_sub<<<BLOCKS, THREADS>>>(*this, exp); return *this; } #define DEFINE_ASSIGN_CONSTANT(name, op) \ T_array& op (T_numtype rhs) \ { \ int BLOCKS = numElements()/THREADS+1; \ name<<<BLOCKS, THREADS>>>(*this, ExprLiteral<T_numtype>(rhs) ); \ return *this; \ } \ DEFINE_ASSIGN_CONSTANT(assign, operator =) DEFINE_ASSIGN_CONSTANT(update_add, operator +=) DEFINE_ASSIGN_CONSTANT(update_sub, operator -=) DEFINE_ASSIGN_CONSTANT(update_mul, operator *=) }; /******************* * Global Functions ***************** */ template <typename T_numtype,int N_rank> void swap(cuArray<T_numtype,N_rank>& a, cuArray<T_numtype,N_rank>& b) { cuArray<T_numtype,N_rank> c(a); a.reference(b); b.reference(c); } } // namespace end #include <expr.h> #include <operators.h> #include <where.h> #include <resize.cpp> #endif // CUARRAY_IMPL
{ "content_hash": "dc1164e511765ae0c1698ef84f47aee8", "timestamp": "", "source": "github", "line_count": 418, "max_line_length": 100, "avg_line_length": 32.28468899521531, "alnum_prop": 0.4281585772508336, "repo_name": "stavka0619/cuda_array", "id": "9994352c6af70aabb243f78a14f57ba3ec2cbd9c", "size": "13495", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "cuarray-impl.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "371" }, { "name": "C++", "bytes": "48578" }, { "name": "Cuda", "bytes": "2626" }, { "name": "Makefile", "bytes": "1196" } ], "symlink_target": "" }
package org.apache.drill.exec.physical.impl.sort; import org.apache.drill.BaseTestQuery; import org.apache.drill.categories.OperatorTest; import org.apache.drill.exec.ExecConstants; import org.apache.drill.exec.util.JsonStringArrayList; import org.apache.drill.exec.util.JsonStringHashMap; import org.junit.Test; import org.junit.experimental.categories.Category; /** * Placeholder for all sort related test. Can be used as we move * more tests to use the new test framework */ @Category(OperatorTest.class) public class TestSort extends BaseTestQuery { private static final JsonStringHashMap<String, Object> x = new JsonStringHashMap<>(); private static final JsonStringArrayList<JsonStringHashMap<String, Object>> repeated_map = new JsonStringArrayList<>(); static { x.put("c", 1l); repeated_map.add(0, x); } @Test public void testSortWithComplexInput() throws Exception { testBuilder() .sqlQuery("select (t.a) as col from cp.`jsoninput/repeatedmap_sort_bug.json` t order by t.b") .ordered() .baselineColumns("col") .baselineValues(repeated_map) .go(); } @Test public void testSortWithRepeatedMapWithExchanges() throws Exception { testBuilder() .sqlQuery("select (t.a) as col from cp.`jsoninput/repeatedmap_sort_bug.json` t order by t.b") .optionSettingQueriesForTestQuery("alter session set `planner.slice_target` = 1") .ordered() .baselineColumns("col") .baselineValues(repeated_map) .go(); // reset the planner.slice_target test("alter session set `planner.slice_target` = " + ExecConstants.SLICE_TARGET_DEFAULT); } }
{ "content_hash": "6211120f20ca188ac3fdc8a0f431d985", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 121, "avg_line_length": 33.3, "alnum_prop": 0.7141141141141141, "repo_name": "shakamunyi/drill", "id": "19f4f616fd43e8a643fb7007367dd38612f080c8", "size": "2467", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/sort/TestSort.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "6163" }, { "name": "C", "bytes": "31429" }, { "name": "C++", "bytes": "583972" }, { "name": "CMake", "bytes": "24670" }, { "name": "CSS", "bytes": "13660" }, { "name": "FreeMarker", "bytes": "70557" }, { "name": "GAP", "bytes": "32382" }, { "name": "Java", "bytes": "20966415" }, { "name": "JavaScript", "bytes": "55779" }, { "name": "PLSQL", "bytes": "6665" }, { "name": "Protocol Buffer", "bytes": "44566" }, { "name": "Shell", "bytes": "60155" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin-it-filter</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <build> <testResources> <testResource> <directory>src/test/resources</directory> <filtering>true</filtering> </testResource> </testResources> <filters> <filter>src/test/filters/my.filter</filter> </filters> <pluginManagement> <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>@pom.version@</version> </plugin> </plugins> </pluginManagement> </build> <!-- Look at SomeResource.txt after being processed with filtering. Note the tokens for ${projectProperty} and ${profileProperty} for the "filter resolution" case should be resolved and evaluated using the POM property values of the filter tokens --> <properties> <projectProperty>foo-projectProperty-bar</projectProperty> </properties> <profiles> <profile> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <profileProperty>foo-profileProperty-bar</profileProperty> </properties> </profile> </profiles> </project>
{ "content_hash": "eff7809628bd26ce5c9c4c717b25c862", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 201, "avg_line_length": 34.661764705882355, "alnum_prop": 0.7004666949512092, "repo_name": "mikkokar/maven-plugins", "id": "a6797cd00069263a16c47194540cd825dc893d12", "size": "2357", "binary": false, "copies": "15", "ref": "refs/heads/trunk", "path": "maven-resources-plugin/src/it/filter-test-resources/pom.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ApacheConf", "bytes": "1043" }, { "name": "AspectJ", "bytes": "1978" }, { "name": "CSS", "bytes": "14984" }, { "name": "GAP", "bytes": "1429" }, { "name": "Groovy", "bytes": "190870" }, { "name": "HTML", "bytes": "82950" }, { "name": "Java", "bytes": "8065740" }, { "name": "JavaScript", "bytes": "3448" }, { "name": "Shell", "bytes": "49763" } ], "symlink_target": "" }
import fetch from 'isomorphic-fetch' import { requestOptions } from '../utils/session'; import { handleErrors } from '../utils/api'; import Tone from 'tone'; import { remainingDuration } from './../utils/timer'; const synth = new Tone.Synth().toMaster(); const beep = (note, duration) => { synth.triggerAttackRelease(note, duration); } export function fetchRoutines() { return(dispatch) => { dispatch({ type: 'LOADING_ROUTINES' }); return fetch('/api/v1/routines', requestOptions()) .then(response => response.json()) .then(routines => dispatch({ type: 'FETCH_ROUTINES', payload: routines.routines, })); }; } export function loadCurrentRoutine(id) { return(dispatch) => { dispatch({type: 'CLEAR_CURRENT_ROUTINE'}) dispatch({type: 'LOADING_CURRENT_ROUTINE'}); return fetch(`/api/v1/routines/${id}`, requestOptions()) .then(response => response.json()) .then(routine => { dispatch({type: 'FETCH_CURRENT_ROUTINE', payload: routine.routine}) }); } } export function clearCurrentRoutine() { return { type: 'CLEAR_CURRENT_ROUTINE' } } export function advanceCurrentRoutine(playlist) { return(dispatch, getState) => { const { currentRoutine } = getState(); const playlist = currentRoutine.playlist; const time = remainingDuration(playlist); const groupTime = playlist[0].remainingDuration - 1; if (groupTime < 4 && groupTime > 0) { beep("C4", "8n"); } else if (groupTime === 0 && time > 0) { beep("C5", "8n"); } dispatch({ type: 'ADVANCE_TIMER' }); } } export function rewindCurrentRoutine() { return { type: 'REWIND_TIMER' } } export function clearCurrentInterval(id) { clearInterval(id); beep("C5", "4n"); return { type: 'STOP_INTERVAL' }; } export function startCurrentRoutine(id) { return(dispatch) => { const timerId = setInterval(() => { return dispatch(advanceCurrentRoutine()) }, 1000); dispatch({ type: 'START_TIMER', payload: timerId }); dispatch({ type: 'ADVANCE_TIMER' }); } } export function fetchRoutine(id) { return(dispatch) => { dispatch({ type: 'LOADING_ROUTINE' }); return fetch(`/api/v1/routines/${id}`, requestOptions()) .then(response => response.json()) .then(routine => dispatch({ type: 'FETCH_ROUTINE', payload: routine.routine, })); } } export function deleteRoutine(id, history) { return(dispatch) => { const options = requestOptions({ method: 'DELETE' }); dispatch({ type: 'DELETING_ROUTINE' }); return fetch(`/api/v1/routines/${id}`, options) .then(handleErrors) .then(dispatch({ type: 'DELETE_ROUTINES' })) .then(history.push(`/routines`)) .catch((error) => { dispatch({ type: 'UNSUCCESSFULLY_DELETED_ROUTINE' })}) }; }
{ "content_hash": "d8477aa447912c34ccd7be546df9df0e", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 80, "avg_line_length": 25.763636363636362, "alnum_prop": 0.6270289343683839, "repo_name": "snsavage/timer-react", "id": "70fca96ec062fba5547dbbf58b65e21bb7ec603c", "size": "2834", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/actions/routineActions.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "304" }, { "name": "HTML", "bytes": "1185" }, { "name": "JavaScript", "bytes": "87258" } ], "symlink_target": "" }
package io.wcm.devops.conga.generator.util.testmodel; public class Root { private String prop1; private Integer prop2; private ConfScope1 scope1; public String getProp1() { return this.prop1; } public void setProp1(String prop1) { this.prop1 = prop1; } public Integer getProp2() { return this.prop2; } public void setProp2(Integer prop2) { this.prop2 = prop2; } public ConfScope1 getScope1() { return this.scope1; } public void setScope1(ConfScope1 scope1) { this.scope1 = scope1; } }
{ "content_hash": "63b2ee3519a1a0490a942d36c8ff61e7", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 53, "avg_line_length": 15.714285714285714, "alnum_prop": 0.6727272727272727, "repo_name": "wcm-io-devops/conga", "id": "c9d6f2c1ef8aa1869410e1e40024c7f87ee3c7db", "size": "1177", "binary": false, "copies": "2", "ref": "refs/heads/develop", "path": "generator/src/test/java/io/wcm/devops/conga/generator/util/testmodel/Root.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Groovy", "bytes": "360" }, { "name": "Handlebars", "bytes": "4551" }, { "name": "Java", "bytes": "774343" } ], "symlink_target": "" }
package vpp2005 import ( "fmt" "net" govppapi "git.fd.io/govpp.git/api" "go.ligato.io/cn-infra/v2/logging" core_vppcalls "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls" core_vpp2005 "go.ligato.io/vpp-agent/v3/plugins/govppmux/vppcalls/vpp2005" "go.ligato.io/vpp-agent/v3/plugins/vpp" "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2005" "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2005/ip_types" "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2005/sr" "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2005/vpe" "go.ligato.io/vpp-agent/v3/plugins/vpp/ifplugin/ifaceidx" "go.ligato.io/vpp-agent/v3/plugins/vpp/srplugin/vppcalls" ) func init() { msgs := vpp.Messages( sr.AllMessages, vpe.AllMessages, // using also vpe -> need to have correct vpp version also for vpe ) vppcalls.AddHandlerVersion(vpp2005.Version, msgs.AllMessages(), NewSRv6VppHandler) } // SRv6VppHandler is accessor for SRv6-related vppcalls methods type SRv6VppHandler struct { core_vppcalls.VppCoreAPI log logging.Logger callsChannel govppapi.Channel ifIndexes ifaceidx.IfaceMetadataIndex } // NewSRv6VppHandler creates new instance of SRv6 vppcalls handler func NewSRv6VppHandler(c vpp.Client, ifIdx ifaceidx.IfaceMetadataIndex, log logging.Logger) vppcalls.SRv6VppAPI { vppChan, err := c.NewAPIChannel() if err != nil { logging.Warnf("failed to create API channel") return nil } return &SRv6VppHandler{ callsChannel: vppChan, ifIndexes: ifIdx, log: log, VppCoreAPI: core_vpp2005.NewVpeHandler(c), } } func addressToIP(address ip_types.Address) net.IP { if address.Af == ip_types.ADDRESS_IP6 { ipAddr := address.Un.GetIP6() return net.IP(ipAddr[:]).To16() } ipAddr := address.Un.GetIP4() return net.IP(ipAddr[:]).To4() } // parseIPv6 parses string <str> to IPv6 address (including IPv4 address converted to IPv6 address) func parseIPv6(str string) (net.IP, error) { ip := net.ParseIP(str) if ip == nil { return nil, fmt.Errorf(" %q is not ip address", str) } ipv6 := ip.To16() if ipv6 == nil { return nil, fmt.Errorf(" %q is not ipv6 address", str) } return ipv6, nil } func IPToAddress(ipstr string) (addr ip_types.Address, err error) { netIP := net.ParseIP(ipstr) if netIP == nil { return ip_types.Address{}, fmt.Errorf("invalid IP: %q", ipstr) } if ip4 := netIP.To4(); ip4 == nil { addr.Af = ip_types.ADDRESS_IP6 var ip6addr ip_types.IP6Address copy(ip6addr[:], netIP.To16()) addr.Un.SetIP6(ip6addr) } else { addr.Af = ip_types.ADDRESS_IP4 var ip4addr ip_types.IP4Address copy(ip4addr[:], ip4.To4()) addr.Un.SetIP4(ip4addr) } return }
{ "content_hash": "2c47ff4ac5b5c3fc309a26f5157b7048", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 113, "avg_line_length": 28.72826086956522, "alnum_prop": 0.7154748391978812, "repo_name": "VladoLavor/vpp-agent", "id": "ded8808d4c33efc8f7730c19ca3ee7ea3f8eaf2c", "size": "3264", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "plugins/vpp/srplugin/vppcalls/vpp2005/vppcalls_handlers.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "5279" }, { "name": "Go", "bytes": "6199307" }, { "name": "Makefile", "bytes": "16123" }, { "name": "Python", "bytes": "103503" }, { "name": "RobotFramework", "bytes": "1029018" }, { "name": "Shell", "bytes": "67858" } ], "symlink_target": "" }
{-# LANGUAGE OverloadedStrings #-} module Main where import qualified Data.Text.Lazy as T import qualified Data.Text.Lazy.IO as T import Clay hiding (div,filter) import qualified Clay as C import Clay.Property as CP import Clay.Filter as CF import Control.Arrow ((>>>)) import qualified Clay.Stylesheet as CC main :: IO () main = T.putStr $ renderWith compact [] $ do fontSetting codeCss colors fontSetting :: Css fontSetting = fontFace $ do fontFamily ["Hasklig"] [] fontFaceSrc [FontFaceSrcUrl "../fonts/Hasklig-Medium.otf" (Just OpenType)] codeCss :: Css codeCss = pre ? do margin 0 10 0 $ px 10 padding 9 9 9 $ px 9 backgroundColor "#FDF6E3" border solid (px 1) (rgba 0 0 0 128) fontSize $ px 14 borderRadius 5 5 5 $ px 5 textRendering optimizeLegibility whiteSpace preWrap code ? do borderStyle none display block boxShadow none none none none fontFamily ["Hasklig", "Monaco", "Menlo" , "Consolas", "Courier New"] [monospace] -- overflowWrap :: Val a => Key a -> a -> Css -- overflowWrap = CC.key colors :: Css colors = star # ".sourceCode" ? do mapM_ (\(sel,c) -> sel ? color c) csss return () where csss = [ (".kw","#268BD2") , (".dt","#268BD2") , (foldr1 mappend [".dv",".bn",".fl"],"#D33682") , (".ch","#DC322F") , (".st","#2AA198") , (".co","#93A1A1") , (".ot","#A57800") , (".al","#CB4B16") , (".fu","#268BD2") -- , (".re"," ") , (".er","#D30102")]
{ "content_hash": "8aa7274aea2e8c7d03a1f4ba89fda4a3", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 76, "avg_line_length": 25.576271186440678, "alnum_prop": 0.5990722332670643, "repo_name": "kiripon/gh-pages", "id": "f37581e469b9a62bbfd46b0b03cebfa13b8eef09", "size": "1509", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "css/syntax.hs", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "3108" }, { "name": "HTML", "bytes": "6119" }, { "name": "Haskell", "bytes": "14668" } ], "symlink_target": "" }
<div id="deviceIndex">Links DMX Device auswählen oder hier ein neues DMX Device anlegen<br/> ToDo: <ul> <li>DMX Device per Drag&Drop im Baum verschiebbar machen)</li> <li>Live Modus im Formular für Netio-Dropdown (Auto Update wenn Netio geadded/gelöscht wird) <i>(nicht benötigt wenn Drag&Drop?!?)</i></li> </ul> </div> <div class="deviceButtons"> <input type="button" class="button" id="deviceAdd" value="Add"/> </div>
{ "content_hash": "11fcae1ea47e5c125ba99b6b95d2d283", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 143, "avg_line_length": 43.2, "alnum_prop": 0.7060185185185185, "repo_name": "shuairan/mochaui-dmx", "id": "2c8a38e4364a0ee5143872ca50b909244202640d", "size": "436", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "plugins/dmxdevices/index.html", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "1447683" }, { "name": "PHP", "bytes": "2228" } ], "symlink_target": "" }
#include <initializer_list> #include <Furrovine++/buffer_view.h> #include <Furrovine++/character_def.h> namespace Furrovine { namespace Unicode { struct standardized_variant { public: std::initializer_list<const codepoint> codepoints; buffer_view<const char> description; buffer_view<const char> when; }; }}
{ "content_hash": "0eca83adaa385b938bb65eb3f2de9517", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 52, "avg_line_length": 21, "alnum_prop": 0.7083333333333334, "repo_name": "bananu7/Furropen", "id": "bd505163dc32d9032057a25a7d1382be12fe46ba", "size": "350", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "include/Furrovine++/Unicode/standardized_variant.h", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
package graphene.web.components; import graphene.web.commons.CustomValidationDecorator; import org.apache.tapestry5.ClientElement; import org.apache.tapestry5.Field; import org.apache.tapestry5.FormValidationControl; import org.apache.tapestry5.MarkupWriter; import org.apache.tapestry5.ValidationDecorator; import org.apache.tapestry5.annotations.Component; import org.apache.tapestry5.annotations.SupportsInformalParameters; import org.apache.tapestry5.corelib.components.Form; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.services.Environment; /** * CustomForm simply wraps a Form so it can introduce our own custom validation decorator in place of the default one. */ @SupportsInformalParameters public class CustomForm implements ClientElement, FormValidationControl { // Generally useful bits and pieces @Inject private Environment environment; @Component(publishParameters = "context, tracker, clientValidation, autoFocus, zone, secure, validationId, validate, class", inheritInformalParameters = true) private Form form; // The code /** * This beginRender() will execute before our inner form's beginRender(). It gives us the chance to change the * environment first - let's push our custom validation decorator onto the environment stack. */ void beginRender(MarkupWriter writer) { environment.push(ValidationDecorator.class, new CustomValidationDecorator(environment, writer)); } /** * This afterRender() will execute after our inner form's beginRender(). Let's undo what we did in beforeRender(). */ void afterRender(MarkupWriter writer) { environment.pop(ValidationDecorator.class); } /** * Returns the client id of the embedded form. */ @Override public String getClientId() { return form.getClientId(); } @Override public void clearErrors() { form.clearErrors(); } @Override public boolean getHasErrors() { return form.getHasErrors(); } @Override public boolean isValid() { return form.isValid(); } @Override public void recordError(String errorMessage) { form.recordError(errorMessage); } @Override public void recordError(Field field, String errorMessage) { form.recordError(field, errorMessage); } }
{ "content_hash": "c6de7d6b2890227ac7d09f3048cba92f", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 126, "avg_line_length": 27.313253012048193, "alnum_prop": 0.7640052933392149, "repo_name": "Sotera/graphene", "id": "bf02742b766cafe31476afb84db22992f3dce439", "size": "3086", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "graphene-parent/graphene-web/src/main/java/graphene/web/components/CustomForm.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ActionScript", "bytes": "15982" }, { "name": "Batchfile", "bytes": "2998" }, { "name": "CSS", "bytes": "1638268" }, { "name": "HTML", "bytes": "31729" }, { "name": "Java", "bytes": "3415980" }, { "name": "JavaScript", "bytes": "5029687" }, { "name": "Shell", "bytes": "96" } ], "symlink_target": "" }
source common/functions.sh # clone the Vundle plugin, to manage vim plugins if [ ! -d "$HOME/.vim/bundle/Vundle.vim/.git" ]; then msg_installing "Installing vundle..." git clone https://github.com/VundleVim/Vundle.vim.git $HOME/.vim/bundle/Vundle.vim else msg_ok "Vundle is already installed." fi # vim's plugins if [[ $OSX && `which vim 2> /dev/null` ]]; then msg_installing "Installing/Updating vim's plugins..." vim -f +NeoBundleInstall +qall if [ $? -eq 0 ]; then msg_ok "vim's plugins updated successfuly."; else msg_alert "We had a problem while updating vim's plugins."; fi fi # powerline fonts if [[ -d "$HOME/.vim/fonts" ]]; then msg_checking "Checking vim fonts directory" else msg_install "Cloning" "https://github.com/powerline/fonts.git" git clone https://github.com/powerline/fonts.git $HOME/.vim/ sh $HOME/.vim/fonts/install.sh ok "OK" fi # powerline pip install git+git://github.com/powerline/powerline
{ "content_hash": "c9f859545a4728df6d847482b3874642", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 86, "avg_line_length": 27.61111111111111, "alnum_prop": 0.6720321931589537, "repo_name": "gbrlsepulveda/dotfiles", "id": "a9538d012cc4fbdf8061efd05737482e68521c83", "size": "994", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vim/global.sh", "mode": "33188", "license": "mit", "language": [ { "name": "Shell", "bytes": "6754" }, { "name": "Vim script", "bytes": "4677" } ], "symlink_target": "" }
<nav class="navbar-default navbar-static-side" role="navigation"> <div class="sidebar-collapse"> <ul class="nav metismenu" id="side-menu"> <li class="nav-header"> <div class="dropdown profile-element"> <?php foreach ($get_info_name as $gin) : ?> <span> <center> <img alt="image" class="img-circle img-responsive img-prof-sidebar" src="<?php echo base_url(); ?>public/img/prof/<?php echo $gin->IMAGEURL; ?>" /></center> </span> <a data-toggle="dropdown" class="dropdown-toggle" href="#"> <span class="clear text-center"> <span class="block m-t-xs"> <strong class="font-bold"><?php echo $gin->NAME; ?> <b class="caret"></b></strong> </span> <span class="text-muted text-xs block"><?php echo $gin->ACCOUNT_TYPE; ?></span> </span> </a> <?php endforeach; ?> <ul class="dropdown-menu animated fadeInRight m-t-xs"> <li><a href="<?php echo base_url();?>admin/profile/username/<?php echo $this->session->userdata('log_sess')->USERNAME;?>">Profile</a></li> <li><a href="<?php echo base_url();?>admin/contacts">Contacts</a></li> <li><a href="<?php echo base_url();?>admin/inbox">Local Inbox</a></li> </ul> </div> <div class="logo-element"> JMAE </div> </li> <?php $dashactive = ''; $dashnotif = ''; $dashproduct = ''; $dashuser = ''; $dashinbox = ''; $dashreport = ''; $dashsetting = ''; if ( $curpage == 'Dashboard' ) { $dashactive = "active"; } else if ( $curpage == 'Inbox' ) { $dashinbox = "active"; } else if ( $curpage == 'Compose Message' ) { $dashinbox = "active"; } else if ( $curpage == 'Notification' ) { $dashnotif = "active"; } else if ( $curpage == 'Reports' ) { $dashreport = "active"; } else if ( $curpage == 'About My Site' ) { $dashsetting = "active"; } else if ( $curpage == 'Events' ) { $dashsetting = "active"; } else if ( $curpage == 'Paypal Configuration' ) { $dashsetting = "active"; } else if ( $curpage == 'Product Grid' ) { $dashproduct = "active"; } else if ( $curpage == 'Product Category' ) { $dashproduct = "active"; } else if ( $curpage == 'Product Sales' ) { $dashproduct = "active"; } else if ( $curpage == 'Accounts' ) { $dashuser = "active"; } else if ( $curpage == 'Co-Administrator' ) { $dashuser = "active"; } ?> <?php foreach ($permission_cntnt as $permission) : ?> <?php if ($permission == "Dashboard") { ?> <li class="<?php echo $dashactive; ?>"> <a href="<?php echo base_url();?>admin"><i class="fa fa-th-large"></i> <span class="nav-label">Dashboard</span></a> </li> <?php } ?> <?php if ($permission == "Messages") { ?> <li class="<?php echo $dashinbox; ?>"> <a href="#"><i class="fa fa-envelope"></i> <span class="nav-label">Messages </span><span class="fa arrow"></span></a> <ul class="nav nav-second-level collapse"> <?php foreach($permission_cntnt as $persub) : ?> <?php if ($persub == "Compose Message") { ?> <li><a href="<?php echo base_url();?>admin/compose_message">Compose Message</a></li> <?php } ?> <?php if ($persub == "Inbox") { ?> <li><a href="<?php echo base_url();?>admin/inbox">Inbox</a></li> <?php } ?> <?php endforeach; ?> </ul> </li> <?php } ?> <?php if ($permission == "Notification") { ?> <li class="<?php echo $dashnotif; ?>"> <a href="<?php echo base_url();?>admin/notification"><i class="fa fa-bell"></i> <span class="nav-label">Notification</span></a> </li> <?php } ?> <?php if ($permission == "Statistics") { ?> <li class="<?php echo $dashreport; ?>"> <a href="#"><i class="fa fa-area-chart"></i> <span class="nav-label">Statistics</span><span class="fa arrow"></span></a> <ul class="nav nav-second-level collapse"> <?php foreach($permission_cntnt as $persub) : ?> <?php if ($persub == "Reports") { ?> <li><a href="<?php echo base_url();?>admin/reports">Reports</a></li> <?php } ?> <?php endforeach; ?> </ul> </li> <?php } ?> <?php if ($permission == "Settings") { ?> <li class="<?php echo $dashsetting; ?>"> <a href="#"><i class="fa fa-cog"></i> <span class="nav-label">Settings</span><span class="fa arrow"></span></a> <ul class="nav nav-second-level collapse"> <?php foreach($permission_cntnt as $persub) : ?> <?php if ($persub == "About My Site") { ?> <li><a href="<?php echo base_url();?>admin/about_my_site">About My Site</a></li> <?php } ?> <?php if ($persub == "Events") { ?> <li><a href="<?php echo base_url();?>admin/events">Events</a></li> <?php } ?> <?php if ($persub == "PayPal Configuration") { ?> <li><a href="<?php echo base_url();?>admin/paypal_configuration">PayPal Configuration</a></li> <?php } ?> <?php endforeach; ?> </ul> </li> <?php } ?> <?php if ($permission == "Product_Management") { ?> <li class="<?php echo $dashproduct; ?>"> <a href="#"><i class="fa fa-product-hunt"></i> <span class="nav-label">Product Management </span><span class="fa arrow"></span></a> <ul class="nav nav-second-level collapse"> <?php foreach($permission_cntnt as $persub) : ?> <?php if ($persub == "Product Category") { ?> <li><a href="<?php echo base_url();?>admin/product_category">Product Category</a></li> <?php } ?> <?php if ($persub == "Product Grid") { ?> <li><a href="<?php echo base_url();?>admin/product_grid">Product Grid</a></li> <?php } ?> <?php if ($persub == "Product Sales") { ?> <li><a href="<?php echo base_url();?>admin/product_sales">Product Sales</a></li> <?php } ?> <?php endforeach; ?> </ul> </li> <?php } ?> <?php if ($permission == "User_Management") { ?> <li class="<?php echo $dashuser; ?>"> <a href="#"><i class="fa fa-cogs"></i> <span class="nav-label">User Management </span><span class="fa arrow"></span></a> <ul class="nav nav-second-level collapse"> <?php foreach($permission_cntnt as $persub) : ?> <?php if ($persub == "Accounts") { ?> <li><a href="<?php echo base_url();?>admin/accounts">Accounts</a></li> <?php } ?> <?php if ($persub == "Co-Administrator") { ?> <li><a href="<?php echo base_url();?>admin/co_administrator">Co-Administrator</a></li> <?php } ?> <?php endforeach; ?> </ul> </li> <?php } ?> <?php endforeach; ?> </ul> </div> </nav>
{ "content_hash": "cadaf7774a6ce4aa74afcec429a1fb8a", "timestamp": "", "source": "github", "line_count": 210, "max_line_length": 188, "avg_line_length": 48.142857142857146, "alnum_prop": 0.35341246290801187, "repo_name": "johnmarkabril/design2", "id": "885091cf6918e74c645b8a49911a32a5d1b0ebe8", "size": "10110", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "application/views/common/navside_admin.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "402" }, { "name": "CSS", "bytes": "1355152" }, { "name": "HTML", "bytes": "8279026" }, { "name": "JavaScript", "bytes": "2272113" }, { "name": "PHP", "bytes": "2099191" } ], "symlink_target": "" }
MAKEFLAGS=-r # The source directory tree. srcdir := .. abs_srcdir := $(abspath $(srcdir)) # The name of the builddir. builddir_name ?= . # The V=1 flag on command line makes us verbosely print command lines. ifdef V quiet= else quiet=quiet_ endif # Specify BUILDTYPE=Release on the command line for a release build. BUILDTYPE ?= Release # Directory all our build output goes into. # Note that this must be two directories beneath src/ for unit tests to pass, # as they reach into the src/ directory for data with relative paths. builddir ?= $(builddir_name)/$(BUILDTYPE) abs_builddir := $(abspath $(builddir)) depsdir := $(builddir)/.deps # Object output directory. obj := $(builddir)/obj abs_obj := $(abspath $(obj)) # We build up a list of every single one of the targets so we can slurp in the # generated dependency rule Makefiles in one pass. all_deps := CC.target ?= $(CC) CFLAGS.target ?= $(CFLAGS) CXX.target ?= $(CXX) CXXFLAGS.target ?= $(CXXFLAGS) LINK.target ?= $(LINK) LDFLAGS.target ?= $(LDFLAGS) AR.target ?= $(AR) # C++ apps need to be linked with g++. # # Note: flock is used to seralize linking. Linking is a memory-intensive # process so running parallel links can often lead to thrashing. To disable # the serialization, override LINK via an envrionment variable as follows: # # export LINK=g++ # # This will allow make to invoke N linker processes as specified in -jN. LINK ?= flock $(builddir)/linker.lock $(CXX.target) # TODO(evan): move all cross-compilation logic to gyp-time so we don't need # to replicate this environment fallback in make as well. CC.host ?= gcc CFLAGS.host ?= CXX.host ?= g++ CXXFLAGS.host ?= LINK.host ?= $(CXX.host) LDFLAGS.host ?= AR.host ?= ar # Define a dir function that can handle spaces. # http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions # "leading spaces cannot appear in the text of the first argument as written. # These characters can be put into the argument value by variable substitution." empty := space := $(empty) $(empty) # http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces replace_spaces = $(subst $(space),?,$1) unreplace_spaces = $(subst ?,$(space),$1) dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1))) # Flags to make gcc output dependency info. Note that you need to be # careful here to use the flags that ccache and distcc can understand. # We write to a dep file on the side first and then rename at the end # so we can't end up with a broken dep file. depfile = $(depsdir)/$(call replace_spaces,$@).d DEPFLAGS = -MMD -MF $(depfile).raw # We have to fixup the deps output in a few ways. # (1) the file output should mention the proper .o file. # ccache or distcc lose the path to the target, so we convert a rule of # the form: # foobar.o: DEP1 DEP2 # into # path/to/foobar.o: DEP1 DEP2 # (2) we want missing files not to cause us to fail to build. # We want to rewrite # foobar.o: DEP1 DEP2 \ # DEP3 # to # DEP1: # DEP2: # DEP3: # so if the files are missing, they're just considered phony rules. # We have to do some pretty insane escaping to get those backslashes # and dollar signs past make, the shell, and sed at the same time. # Doesn't work with spaces, but that's fine: .d files have spaces in # their names replaced with other characters. define fixup_dep # The depfile may not exist if the input file didn't have any #includes. touch $(depfile).raw # Fixup path as in (1). sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile) # Add extra rules as in (2). # We remove slashes and replace spaces with new lines; # remove blank lines; # delete the first line and append a colon to the remaining lines. sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ grep -v '^$$' |\ sed -e 1d -e 's|$$|:|' \ >> $(depfile) rm $(depfile).raw endef # Command definitions: # - cmd_foo is the actual command to run; # - quiet_cmd_foo is the brief-output summary of the command. quiet_cmd_cc = CC($(TOOLSET)) $@ cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $< quiet_cmd_cxx = CXX($(TOOLSET)) $@ cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< quiet_cmd_touch = TOUCH $@ cmd_touch = touch $@ quiet_cmd_copy = COPY $@ # send stderr to /dev/null to ignore messages when linking directories. cmd_copy = rm -rf "$@" && cp -af "$<" "$@" quiet_cmd_alink = AR($(TOOLSET)) $@ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^) quiet_cmd_alink_thin = AR($(TOOLSET)) $@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) # Due to circular dependencies between libraries :(, we wrap the # special "figure out circular dependencies" flags around the entire # input list during linking. quiet_cmd_link = LINK($(TOOLSET)) $@ cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) # We support two kinds of shared objects (.so): # 1) shared_library, which is just bundling together many dependent libraries # into a link line. # 2) loadable_module, which is generating a module intended for dlopen(). # # They differ only slightly: # In the former case, we want to package all dependent code into the .so. # In the latter case, we want to package just the API exposed by the # outermost module. # This means shared_library uses --whole-archive, while loadable_module doesn't. # (Note that --whole-archive is incompatible with the --start-group used in # normal linking.) # Other shared-object link notes: # - Set SONAME to the library filename so our binaries don't reference # the local, absolute paths used on the link command-line. quiet_cmd_solink = SOLINK($(TOOLSET)) $@ cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS) quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) # Define an escape_quotes function to escape single quotes. # This allows us to handle quotes properly as long as we always use # use single quotes and escape_quotes. escape_quotes = $(subst ','\'',$(1)) # This comment is here just to include a ' to unconfuse syntax highlighting. # Define an escape_vars function to escape '$' variable syntax. # This allows us to read/write command lines with shell variables (e.g. # $LD_LIBRARY_PATH), without triggering make substitution. escape_vars = $(subst $$,$$$$,$(1)) # Helper that expands to a shell command to echo a string exactly as it is in # make. This uses printf instead of echo because printf's behaviour with respect # to escape sequences is more portable than echo's across different shells # (e.g., dash, bash). exact_echo = printf '%s\n' '$(call escape_quotes,$(1))' # Helper to compare the command we're about to run against the command # we logged the last time we ran the command. Produces an empty # string (false) when the commands match. # Tricky point: Make has no string-equality test function. # The kernel uses the following, but it seems like it would have false # positives, where one string reordered its arguments. # arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ # $(filter-out $(cmd_$@), $(cmd_$(1)))) # We instead substitute each for the empty string into the other, and # say they're equal if both substitutions produce the empty string. # .d files contain ? instead of spaces, take that into account. command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\ $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) # Helper that is non-empty when a prerequisite changes. # Normally make does this implicitly, but we force rules to always run # so we can check their command lines. # $? -- new prerequisites # $| -- order-only dependencies prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) # Helper that executes all postbuilds until one fails. define do_postbuilds @E=0;\ for p in $(POSTBUILDS); do\ eval $$p;\ E=$$?;\ if [ $$E -ne 0 ]; then\ break;\ fi;\ done;\ if [ $$E -ne 0 ]; then\ rm -rf "$@";\ exit $$E;\ fi endef # do_cmd: run a command via the above cmd_foo names, if necessary. # Should always run for a given target to handle command-line changes. # Second argument, if non-zero, makes it do asm/C/C++ dependency munging. # Third argument, if non-zero, makes it do POSTBUILDS processing. # Note: We intentionally do NOT call dirx for depfile, since it contains ? for # spaces already and dirx strips the ? characters. define do_cmd $(if $(or $(command_changed),$(prereq_changed)), @$(call exact_echo, $($(quiet)cmd_$(1))) @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" $(if $(findstring flock,$(word 1,$(cmd_$1))), @$(cmd_$(1)) @echo " $(quiet_cmd_$(1)): Finished", @$(cmd_$(1)) ) @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) @$(if $(2),$(fixup_dep)) $(if $(and $(3), $(POSTBUILDS)), $(call do_postbuilds) ) ) endef # Declare the "all" target first so it is the default, # even though we don't have the deps yet. .PHONY: all all: # make looks for ways to re-generate included makefiles, but in our case, we # don't have a direct way. Explicitly telling make that it has nothing to do # for them makes it go faster. %.d: ; # Use FORCE_DO_CMD to force a target to run. Should be coupled with # do_cmd. .PHONY: FORCE_DO_CMD FORCE_DO_CMD: TOOLSET := target # Suffix rules, putting all outputs into $(obj). $(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD @$(call do_cmd,cc,1) # Try building from generated source, too. $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD @$(call do_cmd,cxx,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD @$(call do_cmd,cc,1) $(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD @$(call do_cmd,cc,1) ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ $(findstring $(join ^,$(prefix)),\ $(join ^,bufferutil.target.mk)))),) include bufferutil.target.mk endif ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ $(findstring $(join ^,$(prefix)),\ $(join ^,validation.target.mk)))),) include validation.target.mk endif quiet_cmd_regen_makefile = ACTION Regenerating $@ cmd_regen_makefile = cd $(srcdir); /usr/sbin/v0.10.26/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." "-I/home/susana/Programming/Projects/Web Apps/angular-seed/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi" -I/usr/sbin/v0.10.26/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/susana/.node-gyp/0.10.26/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/susana/.node-gyp/0.10.26" "-Dmodule_root_dir=/home/susana/Programming/Projects/Web Apps/angular-seed/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws" binding.gyp Makefile: $(srcdir)/../../../../../../../../../../../../../../usr/sbin/v0.10.26/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/../../../../../../../../../../../../.node-gyp/0.10.26/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(call do_cmd,regen_makefile) # "all" is a concatenation of the "all" targets from all the included # sub-makefiles. This is just here to clarify. all: # Add in dependency-tracking rules. $(all_deps) is the list of every single # target in our tree. Only consider the ones with .d (dependency) info: d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) ifneq ($(d_files),) include $(d_files) endif
{ "content_hash": "ecb19e55e516ae6aa172b9e1d3459152", "timestamp": "", "source": "github", "line_count": 331, "max_line_length": 776, "avg_line_length": 39.516616314199396, "alnum_prop": 0.6639908256880734, "repo_name": "susanafong/flickr-cat-gallery", "id": "facbf83342c96b75c7c0c03f354eb9da8a58cdeb", "size": "13410", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Makefile", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "813" }, { "name": "JavaScript", "bytes": "6147" } ], "symlink_target": "" }
ACCEPTED #### According to Index Fungorum #### Published in null #### Original name Helotium abscedens P. Crouan & H. Crouan ### Remarks null
{ "content_hash": "71e5459b671aacaa9283015c799cbf45", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 40, "avg_line_length": 11.153846153846153, "alnum_prop": 0.696551724137931, "repo_name": "mdoering/backbone", "id": "1e4abb746e969c9ffbf61defa7e716194186116e", "size": "209", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Fungi/Ascomycota/Leotiomycetes/Helotiales/Helotiaceae/Cudoniella/Helotium abscedens/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
@implementation ALPHAGenericModel @end
{ "content_hash": "793fe6a8646f80afcae8a3df2d8b6140", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 33, "avg_line_length": 13.333333333333334, "alnum_prop": 0.85, "repo_name": "nikhildhamsaniya/Alpha", "id": "d23fe936004d389266bf4eb95b984d5423d5c54e", "size": "213", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "Alpha/Model/Core/ALPHAGenericModel.m", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "6698" }, { "name": "Objective-C", "bytes": "1697376" }, { "name": "Ruby", "bytes": "7020" }, { "name": "Shell", "bytes": "4447" } ], "symlink_target": "" }
module.exports = exports = rebuild exports.usage = 'Runs "clean", "configure" and "build" all at once' function rebuild (gyp, argv, callback) { gyp.todo.push( { name: 'clean', args: [] } , { name: 'configure', args: argv } , { name: 'build', args: [] } ) process.nextTick(callback) }
{ "content_hash": "42e8ffffbebe523f95034d6a6c4e3fb2", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 67, "avg_line_length": 23.615384615384617, "alnum_prop": 0.6026058631921825, "repo_name": "jsvelasquezv/agroind-mobile", "id": "9409518af13bf8dec891d8479718d6e3da9e6c2d", "size": "618", "binary": false, "copies": "13", "ref": "refs/heads/master", "path": "platforms/browser/www/node_modules/node-ninja/lib/rebuild.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "3033" }, { "name": "C", "bytes": "4790" }, { "name": "C#", "bytes": "429794" }, { "name": "C++", "bytes": "432816" }, { "name": "CSS", "bytes": "36410" }, { "name": "HTML", "bytes": "214595" }, { "name": "Java", "bytes": "740072" }, { "name": "JavaScript", "bytes": "359545" }, { "name": "Objective-C", "bytes": "784228" }, { "name": "QML", "bytes": "15363" } ], "symlink_target": "" }
<?php return array();
{ "content_hash": "dee75fb3a3f3c89aa6cc4bad71d0262e", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 15, "avg_line_length": 8.666666666666666, "alnum_prop": 0.5384615384615384, "repo_name": "antoinecharlet/Restaurant", "id": "ae330559270bed0a75883076ba185c13dad79093", "size": "26", "binary": false, "copies": "11", "ref": "refs/heads/master", "path": "module/Client/autoload_classmap.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "1853" }, { "name": "JavaScript", "bytes": "595" }, { "name": "PHP", "bytes": "42504" } ], "symlink_target": "" }
// Copyright (C) 2010, 2011 and 2012 Marcin Arkadiusz Skrobiranda. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // 3. Neither the name of the project nor the names of its contributors // may be used to endorse or promote products derived from this software // without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS "AS IS" AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. #ifndef GAMESERVER_COMMON_IDHOLDER_HPP #define GAMESERVER_COMMON_IDHOLDER_HPP #include <Game/GameServer/Common/ConstrainedPair.hpp> namespace GameServer { namespace Common { /** * @brief The identifier of a holder. */ typedef ConstrainedPair<RangedUnsignedShortIntPlusStringPolicy<1, 4> > IDHolder; /** * @brief The available classes of a holder. */ unsigned short int const ID_HOLDER_CLASS_SETTLEMENT(1); unsigned short int const ID_HOLDER_CLASS_SETTLER (2); unsigned short int const ID_HOLDER_CLASS_TRANSPORT (3); unsigned short int const ID_HOLDER_CLASS_TROOP (4); } // namespace Common } // namespace GameServer #endif // GAMESERVER_COMMON_IDHOLDER_HPP
{ "content_hash": "8b7036c6e22cebe4c43a24e4b5d1a4f3", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 80, "avg_line_length": 41.629629629629626, "alnum_prop": 0.7673487544483986, "repo_name": "BrianRickardMason/TheUltimateStrategy", "id": "f0051c100224d5eb5908459872b846e01bf8920b", "size": "2248", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Game/GameServer/Common/IDHolder.hpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "1499" }, { "name": "C++", "bytes": "3828109" }, { "name": "Python", "bytes": "59457" }, { "name": "Shell", "bytes": "1432" } ], "symlink_target": "" }
#include "EdsStrings.h" namespace Eds { std::string getErrorString(EdsError error) { switch(error) { /*----------------------------------------------------------------------- ED-SDK Error Code Masks ------------------------------------------------------------------------*/ case EDS_ISSPECIFIC_MASK: return "EDS_ISSPECIFIC_MASK"; case EDS_COMPONENTID_MASK: return "EDS_COMPONENTID_MASK"; case EDS_RESERVED_MASK: return "EDS_RESERVED_MASK"; case EDS_ERRORID_MASK: return "EDS_ERRORID_MASK"; /*----------------------------------------------------------------------- ED-SDK Base Component IDs ------------------------------------------------------------------------*/ case EDS_CMP_ID_CLIENT_COMPONENTID: return "EDS_CMP_ID_CLIENT_COMPONENTID"; case EDS_CMP_ID_LLSDK_COMPONENTID: return "EDS_CMP_ID_LLSDK_COMPONENTID"; case EDS_CMP_ID_HLSDK_COMPONENTID: return "EDS_CMP_ID_HLSDK_COMPONENTID"; /*----------------------------------------------------------------------- ED-SDK Functin Success Code ------------------------------------------------------------------------*/ case EDS_ERR_OK: return "EDS_ERR_OK"; /*----------------------------------------------------------------------- ED-SDK Generic Error IDs ------------------------------------------------------------------------*/ /* Miscellaneous errors */ case EDS_ERR_UNIMPLEMENTED: return "EDS_ERR_UNIMPLEMENTED"; case EDS_ERR_INTERNAL_ERROR: return "EDS_ERR_INTERNAL_ERROR"; case EDS_ERR_MEM_ALLOC_FAILED: return "EDS_ERR_MEM_ALLOC_FAILED"; case EDS_ERR_MEM_FREE_FAILED: return "EDS_ERR_MEM_FREE_FAILED"; case EDS_ERR_OPERATION_CANCELLED: return "EDS_ERR_OPERATION_CANCELLED"; case EDS_ERR_INCOMPATIBLE_VERSION: return "EDS_ERR_INCOMPATIBLE_VERSION"; case EDS_ERR_NOT_SUPPORTED: return "EDS_ERR_NOT_SUPPORTED"; case EDS_ERR_UNEXPECTED_EXCEPTION: return "EDS_ERR_UNEXPECTED_EXCEPTION"; case EDS_ERR_PROTECTION_VIOLATION: return "EDS_ERR_PROTECTION_VIOLATION"; case EDS_ERR_MISSING_SUBCOMPONENT: return "EDS_ERR_MISSING_SUBCOMPONENT"; case EDS_ERR_SELECTION_UNAVAILABLE: return "EDS_ERR_SELECTION_UNAVAILABLE"; /* File errors */ case EDS_ERR_FILE_IO_ERROR: return "EDS_ERR_FILE_IO_ERROR"; case EDS_ERR_FILE_TOO_MANY_OPEN: return "EDS_ERR_FILE_TOO_MANY_OPEN"; case EDS_ERR_FILE_NOT_FOUND: return "EDS_ERR_FILE_NOT_FOUND"; case EDS_ERR_FILE_OPEN_ERROR: return "EDS_ERR_FILE_OPEN_ERROR"; case EDS_ERR_FILE_CLOSE_ERROR: return "EDS_ERR_FILE_CLOSE_ERROR"; case EDS_ERR_FILE_SEEK_ERROR: return "EDS_ERR_FILE_SEEK_ERROR"; case EDS_ERR_FILE_TELL_ERROR: return "EDS_ERR_FILE_TELL_ERROR"; case EDS_ERR_FILE_READ_ERROR: return "EDS_ERR_FILE_READ_ERROR"; case EDS_ERR_FILE_WRITE_ERROR: return "EDS_ERR_FILE_WRITE_ERROR"; case EDS_ERR_FILE_PERMISSION_ERROR: return "EDS_ERR_FILE_PERMISSION_ERROR"; case EDS_ERR_FILE_DISK_FULL_ERROR: return "EDS_ERR_FILE_DISK_FULL_ERROR"; case EDS_ERR_FILE_ALREADY_EXISTS: return "EDS_ERR_FILE_ALREADY_EXISTS"; case EDS_ERR_FILE_FORMAT_UNRECOGNIZED: return "EDS_ERR_FILE_FORMAT_UNRECOGNIZED"; case EDS_ERR_FILE_DATA_CORRUPT: return "EDS_ERR_FILE_DATA_CORRUPT"; case EDS_ERR_FILE_NAMING_NA: return "EDS_ERR_FILE_NAMING_NA"; /* Directory errors */ case EDS_ERR_DIR_NOT_FOUND: return "EDS_ERR_DIR_NOT_FOUND"; case EDS_ERR_DIR_IO_ERROR: return "EDS_ERR_DIR_IO_ERROR"; case EDS_ERR_DIR_ENTRY_NOT_FOUND: return "EDS_ERR_DIR_ENTRY_NOT_FOUND"; case EDS_ERR_DIR_ENTRY_EXISTS: return "EDS_ERR_DIR_ENTRY_EXISTS"; case EDS_ERR_DIR_NOT_EMPTY: return "EDS_ERR_DIR_NOT_EMPTY"; /* Property errors */ case EDS_ERR_PROPERTIES_UNAVAILABLE: return "EDS_ERR_PROPERTIES_UNAVAILABLE"; case EDS_ERR_PROPERTIES_MISMATCH: return "EDS_ERR_PROPERTIES_MISMATCH"; case EDS_ERR_PROPERTIES_NOT_LOADED: return "EDS_ERR_PROPERTIES_NOT_LOADED"; /* Function Parameter errors */ case EDS_ERR_INVALID_PARAMETER: return "EDS_ERR_INVALID_PARAMETER"; case EDS_ERR_INVALID_HANDLE: return "EDS_ERR_INVALID_HANDLE"; case EDS_ERR_INVALID_POINTER: return "EDS_ERR_INVALID_POINTER"; case EDS_ERR_INVALID_INDEX: return "EDS_ERR_INVALID_INDEX"; case EDS_ERR_INVALID_LENGTH: return "EDS_ERR_INVALID_LENGTH"; case EDS_ERR_INVALID_FN_POINTER: return "EDS_ERR_INVALID_FN_POINTER"; case EDS_ERR_INVALID_SORT_FN: return "EDS_ERR_INVALID_SORT_FN"; /* Device errors */ case EDS_ERR_DEVICE_NOT_FOUND: return "EDS_ERR_DEVICE_NOT_FOUND"; case EDS_ERR_DEVICE_BUSY: return "EDS_ERR_DEVICE_BUSY"; case EDS_ERR_DEVICE_INVALID: return "EDS_ERR_DEVICE_INVALID"; case EDS_ERR_DEVICE_EMERGENCY: return "EDS_ERR_DEVICE_EMERGENCY"; case EDS_ERR_DEVICE_MEMORY_FULL: return "EDS_ERR_DEVICE_MEMORY_FULL"; case EDS_ERR_DEVICE_INTERNAL_ERROR: return "EDS_ERR_DEVICE_INTERNAL_ERROR"; case EDS_ERR_DEVICE_INVALID_PARAMETER: return "EDS_ERR_DEVICE_INVALID_PARAMETER"; case EDS_ERR_DEVICE_NO_DISK: return "EDS_ERR_DEVICE_NO_DISK"; case EDS_ERR_DEVICE_DISK_ERROR: return "EDS_ERR_DEVICE_DISK_ERROR"; case EDS_ERR_DEVICE_CF_GATE_CHANGED: return "EDS_ERR_DEVICE_CF_GATE_CHANGED"; case EDS_ERR_DEVICE_DIAL_CHANGED: return "EDS_ERR_DEVICE_DIAL_CHANGED"; case EDS_ERR_DEVICE_NOT_INSTALLED: return "EDS_ERR_DEVICE_NOT_INSTALLED"; case EDS_ERR_DEVICE_STAY_AWAKE: return "EDS_ERR_DEVICE_STAY_AWAKE"; case EDS_ERR_DEVICE_NOT_RELEASED: return "EDS_ERR_DEVICE_NOT_RELEASED"; /* Stream errors */ case EDS_ERR_STREAM_IO_ERROR: return "EDS_ERR_STREAM_IO_ERROR"; case EDS_ERR_STREAM_NOT_OPEN: return "EDS_ERR_STREAM_NOT_OPEN"; case EDS_ERR_STREAM_ALREADY_OPEN: return "EDS_ERR_STREAM_ALREADY_OPEN"; case EDS_ERR_STREAM_OPEN_ERROR: return "EDS_ERR_STREAM_OPEN_ERROR"; case EDS_ERR_STREAM_CLOSE_ERROR: return "EDS_ERR_STREAM_CLOSE_ERROR"; case EDS_ERR_STREAM_SEEK_ERROR: return "EDS_ERR_STREAM_SEEK_ERROR"; case EDS_ERR_STREAM_TELL_ERROR: return "EDS_ERR_STREAM_TELL_ERROR"; case EDS_ERR_STREAM_READ_ERROR: return "EDS_ERR_STREAM_READ_ERROR"; case EDS_ERR_STREAM_WRITE_ERROR: return "EDS_ERR_STREAM_WRITE_ERROR"; case EDS_ERR_STREAM_PERMISSION_ERROR: return "EDS_ERR_STREAM_PERMISSION_ERROR"; case EDS_ERR_STREAM_COULDNT_BEGIN_THREAD: return "EDS_ERR_STREAM_COULDNT_BEGIN_THREAD"; case EDS_ERR_STREAM_BAD_OPTIONS: return "EDS_ERR_STREAM_BAD_OPTIONS"; case EDS_ERR_STREAM_END_OF_STREAM: return "EDS_ERR_STREAM_END_OF_STREAM"; /* Communications errors */ case EDS_ERR_COMM_PORT_IS_IN_USE: return "EDS_ERR_COMM_PORT_IS_IN_USE"; case EDS_ERR_COMM_DISCONNECTED: return "EDS_ERR_COMM_DISCONNECTED"; case EDS_ERR_COMM_DEVICE_INCOMPATIBLE: return "EDS_ERR_COMM_DEVICE_INCOMPATIBLE"; case EDS_ERR_COMM_BUFFER_FULL: return "EDS_ERR_COMM_BUFFER_FULL"; case EDS_ERR_COMM_USB_BUS_ERR: return "EDS_ERR_COMM_USB_BUS_ERR"; /* Lock/Unlock */ case EDS_ERR_USB_DEVICE_LOCK_ERROR: return "EDS_ERR_USB_DEVICE_LOCK_ERROR"; case EDS_ERR_USB_DEVICE_UNLOCK_ERROR: return "EDS_ERR_USB_DEVICE_UNLOCK_ERROR"; /* STI/WIA */ case EDS_ERR_STI_UNKNOWN_ERROR: return "EDS_ERR_STI_UNKNOWN_ERROR"; case EDS_ERR_STI_INTERNAL_ERROR: return "EDS_ERR_STI_INTERNAL_ERROR"; case EDS_ERR_STI_DEVICE_CREATE_ERROR: return "EDS_ERR_STI_DEVICE_CREATE_ERROR"; case EDS_ERR_STI_DEVICE_RELEASE_ERROR: return "EDS_ERR_STI_DEVICE_RELEASE_ERROR"; case EDS_ERR_DEVICE_NOT_LAUNCHED: return "EDS_ERR_DEVICE_NOT_LAUNCHED"; case EDS_ERR_ENUM_NA: return "EDS_ERR_ENUM_NA"; case EDS_ERR_INVALID_FN_CALL: return "EDS_ERR_INVALID_FN_CALL"; case EDS_ERR_HANDLE_NOT_FOUND: return "EDS_ERR_HANDLE_NOT_FOUND"; case EDS_ERR_INVALID_ID: return "EDS_ERR_INVALID_ID"; case EDS_ERR_WAIT_TIMEOUT_ERROR: return "EDS_ERR_WAIT_TIMEOUT_ERROR"; /* PTP */ case EDS_ERR_SESSION_NOT_OPEN: return "EDS_ERR_SESSION_NOT_OPEN"; case EDS_ERR_INVALID_TRANSACTIONID: return "EDS_ERR_INVALID_TRANSACTIONID"; case EDS_ERR_INCOMPLETE_TRANSFER: return "EDS_ERR_INCOMPLETE_TRANSFER"; case EDS_ERR_INVALID_STRAGEID: return "EDS_ERR_INVALID_STRAGEID"; case EDS_ERR_DEVICEPROP_NOT_SUPPORTED: return "EDS_ERR_DEVICEPROP_NOT_SUPPORTED"; case EDS_ERR_INVALID_OBJECTFORMATCODE: return "EDS_ERR_INVALID_OBJECTFORMATCODE"; case EDS_ERR_SELF_TEST_FAILED: return "EDS_ERR_SELF_TEST_FAILED"; case EDS_ERR_PARTIAL_DELETION: return "EDS_ERR_PARTIAL_DELETION"; case EDS_ERR_SPECIFICATION_BY_FORMAT_UNSUPPORTED: return "EDS_ERR_SPECIFICATION_BY_FORMAT_UNSUPPORTED"; case EDS_ERR_NO_VALID_OBJECTINFO: return "EDS_ERR_NO_VALID_OBJECTINFO"; case EDS_ERR_INVALID_CODE_FORMAT: return "EDS_ERR_INVALID_CODE_FORMAT"; case EDS_ERR_UNKNOWN_VENDOR_CODE: return "EDS_ERR_UNKNOWN_VENDOR_CODE"; case EDS_ERR_CAPTURE_ALREADY_TERMINATED: return "EDS_ERR_CAPTURE_ALREADY_TERMINATED"; case EDS_ERR_INVALID_PARENTOBJECT: return "EDS_ERR_INVALID_PARENTOBJECT"; case EDS_ERR_INVALID_DEVICEPROP_FORMAT: return "EDS_ERR_INVALID_DEVICEPROP_FORMAT"; case EDS_ERR_INVALID_DEVICEPROP_VALUE: return "EDS_ERR_INVALID_DEVICEPROP_VALUE"; case EDS_ERR_SESSION_ALREADY_OPEN: return "EDS_ERR_SESSION_ALREADY_OPEN"; case EDS_ERR_TRANSACTION_CANCELLED: return "EDS_ERR_TRANSACTION_CANCELLED"; case EDS_ERR_SPECIFICATION_OF_DESTINATION_UNSUPPORTED: return "EDS_ERR_SPECIFICATION_OF_DESTINATION_UNSUPPORTED"; /* PTP Vendor */ case EDS_ERR_UNKNOWN_COMMAND: return "EDS_ERR_UNKNOWN_COMMAND"; case EDS_ERR_OPERATION_REFUSED: return "EDS_ERR_OPERATION_REFUSED"; case EDS_ERR_LENS_COVER_CLOSE: return "EDS_ERR_LENS_COVER_CLOSE"; case EDS_ERR_LOW_BATTERY: return "EDS_ERR_LOW_BATTERY"; case EDS_ERR_OBJECT_NOTREADY: return "EDS_ERR_OBJECT_NOTREADY"; case EDS_ERR_TAKE_PICTURE_AF_NG: return "EDS_ERR_TAKE_PICTURE_AF_NG"; case EDS_ERR_TAKE_PICTURE_RESERVED: return "EDS_ERR_TAKE_PICTURE_RESERVED"; case EDS_ERR_TAKE_PICTURE_MIRROR_UP_NG: return "EDS_ERR_TAKE_PICTURE_MIRROR_UP_NG"; case EDS_ERR_TAKE_PICTURE_SENSOR_CLEANING_NG: return "EDS_ERR_TAKE_PICTURE_SENSOR_CLEANING_NG"; case EDS_ERR_TAKE_PICTURE_SILENCE_NG: return "EDS_ERR_TAKE_PICTURE_SILENCE_NG"; case EDS_ERR_TAKE_PICTURE_NO_CARD_NG: return "EDS_ERR_TAKE_PICTURE_NO_CARD_NG"; case EDS_ERR_TAKE_PICTURE_CARD_NG: return "EDS_ERR_TAKE_PICTURE_CARD_NG"; case EDS_ERR_TAKE_PICTURE_CARD_PROTECT_NG: return "EDS_ERR_TAKE_PICTURE_CARD_PROTECT_NG"; case EDS_ERR_TAKE_PICTURE_MOVIE_CROP_NG: return "EDS_ERR_TAKE_PICTURE_MOVIE_CROP_NG"; case EDS_ERR_TAKE_PICTURE_STROBO_CHARGE_NG: return "EDS_ERR_TAKE_PICTURE_STROBO_CHARGE_NG"; case EDS_ERR_LAST_GENERIC_ERROR_PLUS_ONE: return "EDS_ERR_LAST_GENERIC_ERROR_PLUS_ONE"; default: return "[unrecognized EdsError]"; } } std::string getPropertyIDString(EdsPropertyID property) { switch(property) { /*---------------------------------- Camera Setting Properties ----------------------------------*/ case kEdsPropID_Unknown: return "kEdsPropID_Unknown"; case kEdsPropID_ProductName: return "kEdsPropID_ProductName"; case kEdsPropID_OwnerName: return "kEdsPropID_OwnerName"; case kEdsPropID_MakerName: return "kEdsPropID_MakerName"; case kEdsPropID_DateTime: return "kEdsPropID_DateTime"; case kEdsPropID_FirmwareVersion: return "kEdsPropID_FirmwareVersion"; case kEdsPropID_BatteryLevel: return "kEdsPropID_BatteryLevel"; case kEdsPropID_CFn: return "kEdsPropID_CFn"; case kEdsPropID_SaveTo: return "kEdsPropID_SaveTo"; case kEdsPropID_CurrentStorage: return "kEdsPropID_CurrentStorage"; case kEdsPropID_CurrentFolder: return "kEdsPropID_CurrentFolder"; case kEdsPropID_MyMenu: return "kEdsPropID_MyMenu"; case kEdsPropID_BatteryQuality: return "kEdsPropID_BatteryQuality"; case kEdsPropID_BodyIDEx: return "kEdsPropID_BodyIDEx"; case kEdsPropID_HDDirectoryStructure: return "kEdsPropID_HDDirectoryStructure"; /*---------------------------------- Image Properties ----------------------------------*/ case kEdsPropID_ImageQuality: return "kEdsPropID_ImageQuality"; case kEdsPropID_JpegQuality: return "kEdsPropID_JpegQuality"; case kEdsPropID_Orientation: return "kEdsPropID_Orientation"; case kEdsPropID_ICCProfile: return "kEdsPropID_ICCProfile"; case kEdsPropID_FocusInfo: return "kEdsPropID_FocusInfo"; case kEdsPropID_DigitalExposure: return "kEdsPropID_DigitalExposure"; case kEdsPropID_WhiteBalance: return "kEdsPropID_WhiteBalance"; case kEdsPropID_ColorTemperature: return "kEdsPropID_ColorTemperature"; case kEdsPropID_WhiteBalanceShift: return "kEdsPropID_WhiteBalanceShift"; case kEdsPropID_Contrast: return "kEdsPropID_Contrast"; case kEdsPropID_ColorSaturation: return "kEdsPropID_ColorSaturation"; case kEdsPropID_ColorTone: return "kEdsPropID_ColorTone"; case kEdsPropID_Sharpness: return "kEdsPropID_Sharpness"; case kEdsPropID_ColorSpace: return "kEdsPropID_ColorSpace"; case kEdsPropID_ToneCurve: return "kEdsPropID_ToneCurve"; case kEdsPropID_PhotoEffect: return "kEdsPropID_PhotoEffect"; case kEdsPropID_FilterEffect: return "kEdsPropID_FilterEffect"; case kEdsPropID_ToningEffect: return "kEdsPropID_ToningEffect"; case kEdsPropID_ParameterSet: return "kEdsPropID_ParameterSet"; case kEdsPropID_ColorMatrix: return "kEdsPropID_ColorMatrix"; case kEdsPropID_PictureStyle: return "kEdsPropID_PictureStyle"; case kEdsPropID_PictureStyleDesc: return "kEdsPropID_PictureStyleDesc"; case kEdsPropID_PictureStyleCaption: return "kEdsPropID_PictureStyleCaption"; /*---------------------------------- Image Processing Properties ----------------------------------*/ case kEdsPropID_Linear: return "kEdsPropID_Linear"; case kEdsPropID_ClickWBPoint: return "kEdsPropID_ClickWBPoint"; case kEdsPropID_WBCoeffs: return "kEdsPropID_WBCoeffs"; /*---------------------------------- Image GPS Properties ----------------------------------*/ case kEdsPropID_GPSVersionID: return "kEdsPropID_GPSVersionID"; case kEdsPropID_GPSLatitudeRef: return "kEdsPropID_GPSLatitudeRef"; case kEdsPropID_GPSLatitude: return "kEdsPropID_GPSLatitude"; case kEdsPropID_GPSLongitudeRef: return "kEdsPropID_GPSLongitudeRef"; case kEdsPropID_GPSLongitude: return "kEdsPropID_GPSLongitude"; case kEdsPropID_GPSAltitudeRef: return "kEdsPropID_GPSAltitudeRef"; case kEdsPropID_GPSAltitude: return "kEdsPropID_GPSAltitude"; case kEdsPropID_GPSTimeStamp: return "kEdsPropID_GPSTimeStamp"; case kEdsPropID_GPSSatellites: return "kEdsPropID_GPSSatellites"; case kEdsPropID_GPSStatus: return "kEdsPropID_GPSStatus"; case kEdsPropID_GPSMapDatum: return "kEdsPropID_GPSMapDatum"; case kEdsPropID_GPSDateStamp: return "kEdsPropID_GPSDateStamp"; /*---------------------------------- Property Mask ----------------------------------*/ case kEdsPropID_AtCapture_Flag: return "kEdsPropID_AtCapture_Flag"; /*---------------------------------- Capture Properties ----------------------------------*/ case kEdsPropID_AEMode: return "kEdsPropID_AEMode"; case kEdsPropID_DriveMode: return "kEdsPropID_DriveMode"; case kEdsPropID_ISOSpeed: return "kEdsPropID_ISOSpeed"; case kEdsPropID_MeteringMode: return "kEdsPropID_MeteringMode"; case kEdsPropID_AFMode: return "kEdsPropID_AFMode"; case kEdsPropID_Av: return "kEdsPropID_Av"; case kEdsPropID_Tv: return "kEdsPropID_Tv"; case kEdsPropID_ExposureCompensation: return "kEdsPropID_ExposureCompensation"; case kEdsPropID_FlashCompensation: return "kEdsPropID_FlashCompensation"; case kEdsPropID_FocalLength: return "kEdsPropID_FocalLength"; case kEdsPropID_AvailableShots: return "kEdsPropID_AvailableShots"; case kEdsPropID_Bracket: return "kEdsPropID_Bracket"; case kEdsPropID_WhiteBalanceBracket: return "kEdsPropID_WhiteBalanceBracket"; case kEdsPropID_LensName: return "kEdsPropID_LensName"; case kEdsPropID_AEBracket: return "kEdsPropID_AEBracket"; case kEdsPropID_FEBracket: return "kEdsPropID_FEBracket"; case kEdsPropID_ISOBracket: return "kEdsPropID_ISOBracket"; case kEdsPropID_NoiseReduction: return "kEdsPropID_NoiseReduction"; case kEdsPropID_FlashOn: return "kEdsPropID_FlashOn"; case kEdsPropID_RedEye: return "kEdsPropID_RedEye"; case kEdsPropID_FlashMode: return "kEdsPropID_FlashMode"; case kEdsPropID_LensStatus: return "kEdsPropID_LensStatus"; case kEdsPropID_Artist: return "kEdsPropID_Artist"; case kEdsPropID_Copyright: return "kEdsPropID_Copyright"; case kEdsPropID_DepthOfField: return "kEdsPropID_DepthOfField"; case kEdsPropID_EFCompensation: return "kEdsPropID_EFCompensation"; /*---------------------------------- EVF Properties ----------------------------------*/ case kEdsPropID_Evf_OutputDevice: return "kEdsPropID_Evf_OutputDevice"; case kEdsPropID_Evf_Mode: return "kEdsPropID_Evf_Mode"; case kEdsPropID_Evf_WhiteBalance: return "kEdsPropID_Evf_WhiteBalance"; case kEdsPropID_Evf_ColorTemperature: return "kEdsPropID_Evf_ColorTemperature"; case kEdsPropID_Evf_DepthOfFieldPreview: return "kEdsPropID_Evf_DepthOfFieldPreview"; // EVF IMAGE DATA Properties case kEdsPropID_Evf_Zoom: return "kEdsPropID_Evf_Zoom"; case kEdsPropID_Evf_ZoomPosition: return "kEdsPropID_Evf_ZoomPosition"; case kEdsPropID_Evf_FocusAid: return "kEdsPropID_Evf_FocusAid"; case kEdsPropID_Evf_Histogram: return "kEdsPropID_Evf_Histogram"; case kEdsPropID_Evf_ImagePosition: return "kEdsPropID_Evf_ImagePosition"; case kEdsPropID_Evf_HistogramStatus: return "kEdsPropID_Evf_HistogramStatus"; case kEdsPropID_Evf_AFMode: return "kEdsPropID_Evf_AFMode"; case kEdsPropID_Evf_CoordinateSystem: return "kEdsPropID_Evf_CoordinateSystem"; case kEdsPropID_Evf_ZoomRect: return "kEdsPropID_Evf_ZoomRect"; default: return "[unrecognized EdsPropertyID]"; } } std::string getPropertyEventString(EdsPropertyEvent event) { switch(event) { case kEdsPropertyEvent_All: return "kEdsPropertyEvent_All"; break; case kEdsPropertyEvent_PropertyChanged: return "kEdsPropertyEvent_PropertyChanged"; break; case kEdsPropertyEvent_PropertyDescChanged: return "kEdsPropertyEvent_PropertyDescChanged"; break; default: return "[unrecognized EdsPropertyEvent]"; } } std::string getObjectEventString(EdsObjectEvent event) { switch(event) { case kEdsObjectEvent_All: return "kEdsObjectEvent_All"; break; case kEdsObjectEvent_VolumeInfoChanged: return "kEdsObjectEvent_VolumeInfoChanged"; break; case kEdsObjectEvent_VolumeUpdateItems: return "kEdsObjectEvent_VolumeUpdateItems"; break; case kEdsObjectEvent_FolderUpdateItems: return "kEdsObjectEvent_FolderUpdateItems"; break; case kEdsObjectEvent_DirItemCreated: return "kEdsObjectEvent_DirItemCreated"; break; case kEdsObjectEvent_DirItemRemoved: return "kEdsObjectEvent_DirItemRemoved"; break; case kEdsObjectEvent_DirItemInfoChanged: return "kEdsObjectEvent_DirItemInfoChanged"; break; case kEdsObjectEvent_DirItemContentChanged: return "kEdsObjectEvent_DirItemContentChanged"; break; case kEdsObjectEvent_DirItemRequestTransfer: return "kEdsObjectEvent_DirItemRequestTransfer"; break; case kEdsObjectEvent_DirItemRequestTransferDT: return "kEdsObjectEvent_DirItemRequestTransferDT"; break; case kEdsObjectEvent_DirItemCancelTransferDT: return "kEdsObjectEvent_DirItemCancelTransferDT"; break; case kEdsObjectEvent_VolumeAdded: return "kEdsObjectEvent_VolumeAdded"; break; case kEdsObjectEvent_VolumeRemoved: return "kEdsObjectEvent_VolumeRemoved"; break; default: return "[unrecognized EdsObjectEvent]"; } } std::string getStateEventString(EdsStateEvent event) { switch(event) { case kEdsStateEvent_All: return "kEdsStateEvent_All"; break; case kEdsStateEvent_Shutdown: return "kEdsStateEvent_Shutdown"; break; case kEdsStateEvent_JobStatusChanged: return "kEdsStateEvent_JobStatusChanged"; break; case kEdsStateEvent_WillSoonShutDown: return "kEdsStateEvent_WillSoonShutDown"; break; case kEdsStateEvent_ShutDownTimerUpdate: return "kEdsStateEvent_ShutDownTimerUpdate"; break; case kEdsStateEvent_CaptureError: return "kEdsStateEvent_CaptureError"; break; case kEdsStateEvent_InternalError: return "kEdsStateEvent_InternalError"; break; case kEdsStateEvent_AfResult: return "kEdsStateEvent_AfResult"; break; case kEdsStateEvent_BulbExposureTime: return "kEdsStateEvent_BulbExposureTime"; break; default: return "[unrecognized EdsStateEvent]"; } } }
{ "content_hash": "15192985a5f4c3ffe96ecf5050b65996", "timestamp": "", "source": "github", "line_count": 361, "max_line_length": 116, "avg_line_length": 57.04986149584487, "alnum_prop": 0.7141539208545764, "repo_name": "kylemcdonald/ofxEdsdk", "id": "cf3f18dc4ae40441475f5cba718ab510401738e3", "size": "20595", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/EdsWrapper/EdsStrings.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "63367" }, { "name": "C++", "bytes": "121527" }, { "name": "Makefile", "bytes": "9" } ], "symlink_target": "" }
package com.helger.datetime.util; import java.time.Duration; import java.time.LocalDateTime; import java.time.Period; import javax.annotation.CheckForSigned; import javax.annotation.Nonnull; import javax.annotation.concurrent.Immutable; import com.helger.commons.CGlobal; import com.helger.commons.annotation.Nonempty; import com.helger.commons.annotation.PresentForCodeCoverage; import com.helger.commons.collection.impl.CommonsArrayList; import com.helger.commons.collection.impl.ICommonsList; import com.helger.commons.math.MathHelper; /** * Display helper methods for date/time functions. * * @author Philip Helger * @since 9.4.0 */ @Immutable public final class PDTDisplayHelper { /** * Text abstraction for creating multilingual results. * * @author Philip Helger */ public interface IPeriodTextProvider { IPeriodTextProvider EN = new IPeriodTextProvider () {}; IPeriodTextProvider DE = new IPeriodTextProvider () { @Nonnull @Nonempty @Override public String getYears (@CheckForSigned final int nYears) { // Use "abs" to ensure it is "1 year" and "-1 year" return MathHelper.abs (nYears) == 1 ? nYears + " Jahr" : nYears + " Jahre"; } @Nonnull @Nonempty @Override public String getMonths (@CheckForSigned final int nMonths) { return MathHelper.abs (nMonths) == 1 ? nMonths + " Monat" : nMonths + " Monate"; } @Nonnull @Nonempty @Override public String getDays (@CheckForSigned final int nDays) { return MathHelper.abs (nDays) == 1 ? nDays + " Tag" : nDays + " Tage"; } @Nonnull @Nonempty @Override public String getHours (@CheckForSigned final long nHours) { return MathHelper.abs (nHours) == 1 ? nHours + " Stunde" : nHours + " Stunden"; } @Nonnull @Nonempty @Override public String getMinutes (@CheckForSigned final long nMinutes) { return MathHelper.abs (nMinutes) == 1 ? nMinutes + " Minute" : nMinutes + " Minuten"; } @Nonnull @Nonempty @Override public String getSeconds (@CheckForSigned final long nSeconds) { return MathHelper.abs (nSeconds) == 1 ? nSeconds + " Sekunde" : nSeconds + " Sekunden"; } @Nonnull @Override public String getAnd () { return " und "; } }; @Nonnull @Nonempty default String getYears (@CheckForSigned final int nYears) { // Use "abs" to ensure it is "1 year" and "-1 year" return MathHelper.abs (nYears) == 1 ? nYears + " year" : nYears + " years"; } @Nonnull @Nonempty default String getMonths (@CheckForSigned final int nMonths) { return MathHelper.abs (nMonths) == 1 ? nMonths + " month" : nMonths + " months"; } @Nonnull @Nonempty default String getDays (@CheckForSigned final int nDays) { return MathHelper.abs (nDays) == 1 ? nDays + " day" : nDays + " days"; } @Nonnull @Nonempty default String getHours (@CheckForSigned final long nHours) { return MathHelper.abs (nHours) == 1 ? nHours + " hour" : nHours + " hours"; } @Nonnull @Nonempty default String getMinutes (@CheckForSigned final long nMinutes) { return MathHelper.abs (nMinutes) == 1 ? nMinutes + " minute" : nMinutes + " minutes"; } @Nonnull @Nonempty default String getSeconds (@CheckForSigned final long nSeconds) { return MathHelper.abs (nSeconds) == 1 ? nSeconds + " second" : nSeconds + " seconds"; } @Nonnull default String getAnd () { return " and "; } @Nonnull default String getComma () { return ", "; } } @PresentForCodeCoverage private static final PDTDisplayHelper INSTANCE = new PDTDisplayHelper (); private PDTDisplayHelper () {} @Nonnull @Nonempty public static String getPeriodText (final int nYears, final int nMonths, final int nDays, final long nHours, final long nMinutes, final long nSeconds, @Nonnull final IPeriodTextProvider aTextProvider) { final String sYear = aTextProvider.getYears (nYears); final String sMonth = aTextProvider.getMonths (nMonths); final String sDay = aTextProvider.getDays (nDays); final String sHour = aTextProvider.getHours (nHours); final String sMinute = aTextProvider.getMinutes (nMinutes); final String sSecond = aTextProvider.getSeconds (nSeconds); // Skip all "leading 0" parts final ICommonsList <String> aParts = new CommonsArrayList <> (6); if (nYears != 0) aParts.add (sYear); if (nMonths != 0 || aParts.isNotEmpty ()) aParts.add (sMonth); if (nDays != 0 || aParts.isNotEmpty ()) aParts.add (sDay); if (nHours != 0 || aParts.isNotEmpty ()) aParts.add (sHour); if (nMinutes != 0 || aParts.isNotEmpty ()) aParts.add (sMinute); aParts.add (sSecond); final int nParts = aParts.size (); if (nParts == 1) return aParts.get (0); if (nParts == 2) return aParts.get (0) + aTextProvider.getAnd () + aParts.get (1); final StringBuilder aSB = new StringBuilder (); for (int i = 0; i < nParts - 1; ++i) { if (aSB.length () > 0) aSB.append (aTextProvider.getComma ()); aSB.append (aParts.get (i)); } return aSB.append (aTextProvider.getAnd ()).append (aParts.getLast ()).toString (); } @Nonnull @Nonempty public static String getPeriodText (@Nonnull final LocalDateTime aNowLDT, @Nonnull final LocalDateTime aNotAfter, @Nonnull final IPeriodTextProvider aTextProvider) { final Period aPeriod = Period.between (aNowLDT.toLocalDate (), aNotAfter.toLocalDate ()); final Duration aDuration = Duration.between (aNowLDT.toLocalTime (), aNotAfter.toLocalTime ()); final int nYears = aPeriod.getYears (); final int nMonth = aPeriod.getMonths (); int nDays = aPeriod.getDays (); long nTotalSecs = aDuration.getSeconds (); if (nTotalSecs < 0) { if (nDays > 0 || nMonth > 0 || nYears > 0) { nTotalSecs += CGlobal.SECONDS_PER_DAY; nDays--; } } final long nHours = nTotalSecs / CGlobal.SECONDS_PER_HOUR; nTotalSecs -= nHours * CGlobal.SECONDS_PER_HOUR; final long nMinutes = nTotalSecs / CGlobal.SECONDS_PER_MINUTE; nTotalSecs -= nMinutes * CGlobal.SECONDS_PER_MINUTE; return getPeriodText (nYears, nMonth, nDays, nHours, nMinutes, nTotalSecs, aTextProvider); } @Nonnull @Nonempty public static String getPeriodTextDE (@Nonnull final LocalDateTime aNowLDT, @Nonnull final LocalDateTime aNotAfter) { return getPeriodText (aNowLDT, aNotAfter, IPeriodTextProvider.DE); } @Nonnull @Nonempty public static String getPeriodTextEN (@Nonnull final LocalDateTime aNowLDT, @Nonnull final LocalDateTime aNotAfter) { return getPeriodText (aNowLDT, aNotAfter, IPeriodTextProvider.EN); } }
{ "content_hash": "84c850e3813209361529e3fe742ab033", "timestamp": "", "source": "github", "line_count": 249, "max_line_length": 117, "avg_line_length": 29.333333333333332, "alnum_prop": 0.6214403066812705, "repo_name": "phax/ph-commons", "id": "0472c6285861c33a069dfed8c69cd145c3bb444e", "size": "7958", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ph-datetime/src/main/java/com/helger/datetime/util/PDTDisplayHelper.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "221283" }, { "name": "Java", "bytes": "11003809" }, { "name": "XSLT", "bytes": "3137" } ], "symlink_target": "" }
// // FEHeaderMenu.h // FEHeaderMenu // // Created by wangzhanfeng-PC on 15/6/25. // Copyright (c) 2015年 F.E. All rights reserved. // #import <UIKit/UIKit.h> #import "FEHeaderMenuItem.h" @class FEHeaderMenu; typedef NSString *(^titleAtIndex)(NSInteger index, BOOL *isStop); typedef void (^itemClickAtIndex)(FEHeaderMenu *menu, NSInteger index, NSString *title); @interface FEHeaderMenu : UIView @property (copy, nonatomic) titleAtIndex iTitleAtIndex; //获取title @property (copy, nonatomic) itemClickAtIndex iItemClickAtIndex; //点击item处理 @property (strong, nonatomic) NSMutableArray *iTitles; //所有title的集合 //@property (assign, nonatomic) NSInteger maxItemVisible; //能够显示的最大数量,默认值3;多于maxItemVisible的通过滑动显示 @property (assign, nonatomic) NSInteger currentIndex; //当前选中的item位置 @property (assign, nonatomic) BOOL didAddConstranit; //是否添加了constranit @property (strong, nonatomic) UIColor *itemTitleNormalColor UI_APPEARANCE_SELECTOR; //普通状态的title color @property (strong, nonatomic) UIColor *itemTitleSelectedColor UI_APPEARANCE_SELECTOR; //选中状态的title color @property (strong, nonatomic) UIColor *markViewColor UI_APPEARANCE_SELECTOR; // @property (strong, nonatomic) UIColor *warningViewColor UI_APPEARANCE_SELECTOR; // /** * 初始化菜单界面 * @param titleAtIndex index位置上显示的title * @param clickAtIndex 点击index位置上的item */ + (instancetype)menuWithTitleAtIndex:(titleAtIndex)titleAtIndex clickAtIndex:(itemClickAtIndex)clickAtIndex; /** * 重新布局 */ - (void)reloadItems; /** * 获取index位置上的title * @param index 位置 */ - (NSString *)titleAtIndexPath:(NSInteger)index; /** * 显示index位置的item * @param index 要显示的位置 * @param animation 是否需要动画 */ - (void)changeItemToIndex:(NSInteger)index animation:(BOOL)animation; /** * 选中index位置上的item * @param index 要显示的位置 * @param animation 是否需要动画 */ - (void)selectItemAtIndex:(NSInteger)index animation:(BOOL)animation; /** * 在父类中的UIEdgeInsets */ @property (assign, nonatomic) UIEdgeInsets edgeInsetsInSuperView; // /** * 显示index位置的“警告view” */ @property (strong, nonatomic) NSMutableArray *warningItems; // - (void)showWarning:(BOOL)showOrNot AtIndex:(NSInteger)index; @end
{ "content_hash": "7f9db8c2d4be75852d17671752fe3d80", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 108, "avg_line_length": 28.32894736842105, "alnum_prop": 0.7510450534138412, "repo_name": "wzf/FEHeaderMenu", "id": "899c7322de0b107b5a413078fcde99a87b9c3606", "size": "2427", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Classes/FEHeaderMenu.h", "mode": "33188", "license": "mit", "language": [ { "name": "Objective-C", "bytes": "27065" }, { "name": "Ruby", "bytes": "553" } ], "symlink_target": "" }
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE36_Absolute_Path_Traversal__wchar_t_connect_socket_open_72a.cpp Label Definition File: CWE36_Absolute_Path_Traversal.label.xml Template File: sources-sink-72a.tmpl.cpp */ /* * @description * CWE: 36 Absolute Path Traversal * BadSource: connect_socket Read data using a connect socket (client side) * GoodSource: Full path and file name * Sinks: open * BadSink : Open the file named in data using open() * Flow Variant: 72 Data flow: data passed in a vector from one function to another in different source files * * */ #include "std_testcase.h" #include <vector> #ifndef _WIN32 #include <wchar.h> #endif #ifdef _WIN32 #include <winsock2.h> #include <windows.h> #include <direct.h> #pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */ #define CLOSE_SOCKET closesocket #else /* NOT _WIN32 */ #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #define INVALID_SOCKET -1 #define SOCKET_ERROR -1 #define CLOSE_SOCKET close #define SOCKET int #endif #define TCP_PORT 27015 #define IP_ADDRESS "127.0.0.1" using namespace std; namespace CWE36_Absolute_Path_Traversal__wchar_t_connect_socket_open_72 { #ifndef OMITBAD /* bad function declaration */ void badSink(vector<wchar_t *> dataVector); void bad() { wchar_t * data; vector<wchar_t *> dataVector; wchar_t dataBuffer[FILENAME_MAX] = L""; data = dataBuffer; { #ifdef _WIN32 WSADATA wsaData; int wsaDataInit = 0; #endif int recvResult; struct sockaddr_in service; wchar_t *replace; SOCKET connectSocket = INVALID_SOCKET; size_t dataLen = wcslen(data); do { #ifdef _WIN32 if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) { break; } wsaDataInit = 1; #endif /* POTENTIAL FLAW: Read data using a connect socket */ connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (connectSocket == INVALID_SOCKET) { break; } memset(&service, 0, sizeof(service)); service.sin_family = AF_INET; service.sin_addr.s_addr = inet_addr(IP_ADDRESS); service.sin_port = htons(TCP_PORT); if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) { break; } /* Abort on error or the connection was closed, make sure to recv one * less char than is in the recv_buf in order to append a terminator */ /* Abort on error or the connection was closed */ recvResult = recv(connectSocket, (char *)(data + dataLen), sizeof(wchar_t) * (FILENAME_MAX - dataLen - 1), 0); if (recvResult == SOCKET_ERROR || recvResult == 0) { break; } /* Append null terminator */ data[dataLen + recvResult / sizeof(wchar_t)] = L'\0'; /* Eliminate CRLF */ replace = wcschr(data, L'\r'); if (replace) { *replace = L'\0'; } replace = wcschr(data, L'\n'); if (replace) { *replace = L'\0'; } } while (0); if (connectSocket != INVALID_SOCKET) { CLOSE_SOCKET(connectSocket); } #ifdef _WIN32 if (wsaDataInit) { WSACleanup(); } #endif } /* Put data in a vector */ dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); badSink(dataVector); } #endif /* OMITBAD */ #ifndef OMITGOOD /* good function declarations */ /* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink(vector<wchar_t *> dataVector); static void goodG2B() { wchar_t * data; vector<wchar_t *> dataVector; wchar_t dataBuffer[FILENAME_MAX] = L""; data = dataBuffer; #ifdef _WIN32 /* FIX: Use a fixed, full path and file name */ wcscat(data, L"c:\\temp\\file.txt"); #else /* FIX: Use a fixed, full path and file name */ wcscat(data, L"/tmp/file.txt"); #endif /* Put data in a vector */ dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); dataVector.insert(dataVector.end(), 1, data); goodG2BSink(dataVector); } void good() { goodG2B(); } #endif /* OMITGOOD */ } /* close namespace */ /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN using namespace CWE36_Absolute_Path_Traversal__wchar_t_connect_socket_open_72; /* so that we can use good and bad easily */ int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
{ "content_hash": "088f73ef9d4c7547c4ff154d20812bf7", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 123, "avg_line_length": 28.22613065326633, "alnum_prop": 0.5818052341107353, "repo_name": "maurer/tiamat", "id": "293bb47d42c782961104cd02eef4c18fc0d66950", "size": "5617", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "samples/Juliet/testcases/CWE36_Absolute_Path_Traversal/s03/CWE36_Absolute_Path_Traversal__wchar_t_connect_socket_open_72a.cpp", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
using System; using System.IO; namespace Tamir.SharpSsh.java.io { /// <summary> /// Summary description for InputStream. /// </summary> public abstract class OutputStream : Stream { public override int Read(byte[] buffer, int offset, int count) { return 0; } public override int ReadByte() { return 0; } public virtual void write(byte[] buffer, int offset, int count) { Write(buffer, offset, count); } public virtual void close() { Close(); } public virtual void flush() { Flush(); } public override bool CanRead { get { return false; } } public override bool CanWrite { get { return true; } } public override bool CanSeek { get { return false; } } public override void Flush() { } public override long Length { get { return 0; } } public override long Position { get { return 0; } set { } } public override void SetLength(long value) { } public override long Seek(long offset, SeekOrigin origin) { return 0; } } }
{ "content_hash": "e6dcc7aaf5eeb50d480935d3d2ed1ff7", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 65, "avg_line_length": 13.988235294117647, "alnum_prop": 0.5475189234650967, "repo_name": "thachngo/dokan", "id": "a8e8ed6f01389a938f7a47f783ec6106c7af870d", "size": "1189", "binary": false, "copies": "96", "ref": "refs/heads/master", "path": "dokan_sshfs/SharpSSH-1.1.1.13/SharpSSH/java/io/OutputStream.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "829" }, { "name": "C", "bytes": "450122" }, { "name": "C#", "bytes": "510381" }, { "name": "C++", "bytes": "43742" }, { "name": "Java", "bytes": "403951" }, { "name": "Makefile", "bytes": "1721" }, { "name": "NSIS", "bytes": "7306" } ], "symlink_target": "" }
package com.logginghub.container; /** * Created by james on 10/02/15. */ public class ContainerException extends RuntimeException { public ContainerException() { } public ContainerException(String message) { super(message); } public ContainerException(String message, Throwable cause) { super(message, cause); } public ContainerException(Throwable cause) { super(cause); } }
{ "content_hash": "cd32375b41a284a03ba02cf38b648af0", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 64, "avg_line_length": 20.80952380952381, "alnum_prop": 0.6681922196796338, "repo_name": "logginghub/container", "id": "d7d09205b24b6a087e9d3ac48efae1c002bb8c10", "size": "437", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "container-core/src/main/java/com/logginghub/container/ContainerException.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Groovy", "bytes": "7297" }, { "name": "Java", "bytes": "73470" } ], "symlink_target": "" }
package org.elasticsearch.xpack.eql.execution.search.extractor; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.xpack.ql.execution.search.extractor.AbstractFieldHitExtractor; import org.elasticsearch.xpack.ql.type.DataType; import org.elasticsearch.xpack.ql.util.DateUtils; import java.io.IOException; import java.time.Instant; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.List; import static org.elasticsearch.xpack.ql.type.DataTypes.DATETIME; public class FieldHitExtractor extends AbstractFieldHitExtractor { static final String NAME = "f"; public FieldHitExtractor(StreamInput in) throws IOException { super(in); } public FieldHitExtractor(String name, String fullFieldName, DataType dataType, ZoneId zoneId, boolean useDocValue, String hitName, boolean arrayLeniency) { super(name, fullFieldName, dataType, zoneId, useDocValue, hitName, arrayLeniency); } @Override public String getWriteableName() { return NAME; } @Override protected ZoneId readZoneId(StreamInput in) throws IOException { return DateUtils.UTC; } @Override protected Object unwrapCustomValue(Object values) { DataType dataType = dataType(); if (dataType == DATETIME) { if (values instanceof String) { return parseDateString(values); } } return null; } protected Object parseDateString(Object values) { return ZonedDateTime.ofInstant(Instant.ofEpochMilli(Long.parseLong(values.toString())), zoneId()); } @Override protected boolean isPrimitive(List<?> list) { return false; } }
{ "content_hash": "8b648d374760f2a915aa7e92f2819eb4", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 134, "avg_line_length": 28.241935483870968, "alnum_prop": 0.7001713306681896, "repo_name": "scorpionvicky/elasticsearch", "id": "b6cfee5efc8990bfd00299e8d3e0f58f9b138cde", "size": "1992", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/execution/search/extractor/FieldHitExtractor.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "11081" }, { "name": "Batchfile", "bytes": "14100" }, { "name": "Emacs Lisp", "bytes": "3341" }, { "name": "FreeMarker", "bytes": "45" }, { "name": "Groovy", "bytes": "316207" }, { "name": "HTML", "bytes": "3399" }, { "name": "Java", "bytes": "39990089" }, { "name": "Perl", "bytes": "7271" }, { "name": "Python", "bytes": "54851" }, { "name": "Shell", "bytes": "108986" } ], "symlink_target": "" }
package org.apache.camel.builder.endpoint.dsl; import java.util.*; import java.util.Map; import java.util.concurrent.*; import java.util.function.*; import java.util.stream.*; import javax.annotation.Generated; import org.apache.camel.builder.EndpointConsumerBuilder; import org.apache.camel.builder.EndpointProducerBuilder; import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; /** * Upload and download files to/from FTP servers. * * Generated by camel build tools - do NOT edit this file! */ @Generated("org.apache.camel.maven.packaging.EndpointDslMojo") public interface FtpEndpointBuilderFactory { /** * Builder for endpoint consumers for the FTP component. */ public interface FtpEndpointConsumerBuilder extends EndpointConsumerBuilder { default AdvancedFtpEndpointConsumerBuilder advanced() { return (AdvancedFtpEndpointConsumerBuilder) this; } /** * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII * (false). * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param binary the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder binary(boolean binary) { doSetProperty("binary", binary); return this; } /** * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII * (false). * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param binary the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder binary(String binary) { doSetProperty("binary", binary); return this; } /** * This option is used to specify the encoding of the file. You can use * this on the consumer, to specify the encodings of the files, which * allow Camel to know the charset it should load the file content in * case the file content is being accessed. Likewise when writing a * file, you can use this option to specify which charset to write the * file as well. Do mind that when writing the file Camel may have to * read the message content into memory to be able to convert the data * into the configured charset, so do not use this if you have big * messages. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: common * * @param charset the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder charset(String charset) { doSetProperty("charset", charset); return this; } /** * Whether or not to disconnect from remote FTP server right after use. * Disconnect will only disconnect the current connection to the FTP * server. If you have a consumer which you want to stop, then you need * to stop the consumer/route instead. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param disconnect the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder disconnect(boolean disconnect) { doSetProperty("disconnect", disconnect); return this; } /** * Whether or not to disconnect from remote FTP server right after use. * Disconnect will only disconnect the current connection to the FTP * server. If you have a consumer which you want to stop, then you need * to stop the consumer/route instead. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param disconnect the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder disconnect(String disconnect) { doSetProperty("disconnect", disconnect); return this; } /** * Producer: If provided, then Camel will write a 2nd done file when the * original file has been written. The done file will be empty. This * option configures what file name to use. Either you can specify a * fixed name. Or you can use dynamic placeholders. The done file will * always be written in the same folder as the original file. Consumer: * If provided, Camel will only consume files if a done file exists. * This option configures what file name to use. Either you can specify * a fixed name. Or you can use dynamic placeholders.The done file is * always expected in the same folder as the original file. Only * ${file.name} and ${file.name.next} is supported as dynamic * placeholders. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: common * * @param doneFileName the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder doneFileName(String doneFileName) { doSetProperty("doneFileName", doneFileName); return this; } /** * Use Expression such as File Language to dynamically set the filename. * For consumers, it's used as a filename filter. For producers, it's * used to evaluate the filename to write. If an expression is set, it * take precedence over the CamelFileName header. (Note: The header * itself can also be an Expression). The expression options support * both String and Expression types. If the expression is a String type, * it is always evaluated using the File Language. If the expression is * an Expression type, the specified Expression type is used - this * allows you, for instance, to use OGNL expressions. For the consumer, * you can use it to filter filenames, so you can for instance consume * today's file using the File Language syntax: * mydata-${date:now:yyyyMMdd}.txt. The producers support the * CamelOverruleFileName header which takes precedence over any existing * CamelFileName header; the CamelOverruleFileName is a header that is * used only once, and makes it easier as this avoids to temporary store * CamelFileName and have to restore it afterwards. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: common * * @param fileName the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder fileName(String fileName) { doSetProperty("fileName", fileName); return this; } /** * Sets passive mode connections. Default is active mode connections. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param passiveMode the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder passiveMode(boolean passiveMode) { doSetProperty("passiveMode", passiveMode); return this; } /** * Sets passive mode connections. Default is active mode connections. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param passiveMode the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder passiveMode(String passiveMode) { doSetProperty("passiveMode", passiveMode); return this; } /** * Sets the path separator to be used. UNIX = Uses unix style path * separator Windows = Uses windows style path separator Auto = (is * default) Use existing path separator in file name. * * The option is a: * &lt;code&gt;org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator&lt;/code&gt; type. * * Default: UNIX * Group: common * * @param separator the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder separator( org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator separator) { doSetProperty("separator", separator); return this; } /** * Sets the path separator to be used. UNIX = Uses unix style path * separator Windows = Uses windows style path separator Auto = (is * default) Use existing path separator in file name. * * The option will be converted to a * &lt;code&gt;org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator&lt;/code&gt; type. * * Default: UNIX * Group: common * * @param separator the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder separator(String separator) { doSetProperty("separator", separator); return this; } /** * Configures the interval in seconds to use when logging the progress * of upload and download operations that are in-flight. This is used * for logging progress when operations takes longer time. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 5 * Group: common * * @param transferLoggingIntervalSeconds the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder transferLoggingIntervalSeconds( int transferLoggingIntervalSeconds) { doSetProperty("transferLoggingIntervalSeconds", transferLoggingIntervalSeconds); return this; } /** * Configures the interval in seconds to use when logging the progress * of upload and download operations that are in-flight. This is used * for logging progress when operations takes longer time. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 5 * Group: common * * @param transferLoggingIntervalSeconds the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder transferLoggingIntervalSeconds( String transferLoggingIntervalSeconds) { doSetProperty("transferLoggingIntervalSeconds", transferLoggingIntervalSeconds); return this; } /** * Configure the logging level to use when logging the progress of * upload and download operations. * * The option is a: * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: DEBUG * Group: common * * @param transferLoggingLevel the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder transferLoggingLevel( org.apache.camel.LoggingLevel transferLoggingLevel) { doSetProperty("transferLoggingLevel", transferLoggingLevel); return this; } /** * Configure the logging level to use when logging the progress of * upload and download operations. * * The option will be converted to a * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: DEBUG * Group: common * * @param transferLoggingLevel the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder transferLoggingLevel( String transferLoggingLevel) { doSetProperty("transferLoggingLevel", transferLoggingLevel); return this; } /** * Configures whether the perform verbose (fine grained) logging of the * progress of upload and download operations. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param transferLoggingVerbose the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder transferLoggingVerbose( boolean transferLoggingVerbose) { doSetProperty("transferLoggingVerbose", transferLoggingVerbose); return this; } /** * Configures whether the perform verbose (fine grained) logging of the * progress of upload and download operations. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param transferLoggingVerbose the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder transferLoggingVerbose( String transferLoggingVerbose) { doSetProperty("transferLoggingVerbose", transferLoggingVerbose); return this; } /** * If true, the file will be deleted after it is processed successfully. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer * * @param delete the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder delete(boolean delete) { doSetProperty("delete", delete); return this; } /** * If true, the file will be deleted after it is processed successfully. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer * * @param delete the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder delete(String delete) { doSetProperty("delete", delete); return this; } /** * Sets the move failure expression based on Simple language. For * example, to move files into a .error subdirectory use: .error. Note: * When moving the files to the fail location Camel will handle the * error and will not pick up the file again. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: consumer * * @param moveFailed the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder moveFailed(String moveFailed) { doSetProperty("moveFailed", moveFailed); return this; } /** * If true, the file is not moved or deleted in any way. This option is * good for readonly data, or for ETL type requirements. If noop=true, * Camel will set idempotent=true as well, to avoid consuming the same * files over and over again. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer * * @param noop the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder noop(boolean noop) { doSetProperty("noop", noop); return this; } /** * If true, the file is not moved or deleted in any way. This option is * good for readonly data, or for ETL type requirements. If noop=true, * Camel will set idempotent=true as well, to avoid consuming the same * files over and over again. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer * * @param noop the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder noop(String noop) { doSetProperty("noop", noop); return this; } /** * Expression (such as File Language) used to dynamically set the * filename when moving it before processing. For example to move * in-progress files into the order directory set this value to order. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: consumer * * @param preMove the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder preMove(String preMove) { doSetProperty("preMove", preMove); return this; } /** * When pre-sort is enabled then the consumer will sort the file and * directory names during polling, that was retrieved from the file * system. You may want to do this in case you need to operate on the * files in a sorted order. The pre-sort is executed before the consumer * starts to filter, and accept files to process by Camel. This option * is default=false meaning disabled. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer * * @param preSort the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder preSort(boolean preSort) { doSetProperty("preSort", preSort); return this; } /** * When pre-sort is enabled then the consumer will sort the file and * directory names during polling, that was retrieved from the file * system. You may want to do this in case you need to operate on the * files in a sorted order. The pre-sort is executed before the consumer * starts to filter, and accept files to process by Camel. This option * is default=false meaning disabled. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer * * @param preSort the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder preSort(String preSort) { doSetProperty("preSort", preSort); return this; } /** * If a directory, will look for files in all the sub-directories as * well. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer * * @param recursive the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder recursive(boolean recursive) { doSetProperty("recursive", recursive); return this; } /** * If a directory, will look for files in all the sub-directories as * well. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer * * @param recursive the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder recursive(String recursive) { doSetProperty("recursive", recursive); return this; } /** * Configures whether resume download is enabled. This must be supported * by the FTP server (almost all FTP servers support it). In addition * the options localWorkDirectory must be configured so downloaded files * are stored in a local directory, and the option binary must be * enabled, which is required to support resuming of downloads. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer * * @param resumeDownload the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder resumeDownload(boolean resumeDownload) { doSetProperty("resumeDownload", resumeDownload); return this; } /** * Configures whether resume download is enabled. This must be supported * by the FTP server (almost all FTP servers support it). In addition * the options localWorkDirectory must be configured so downloaded files * are stored in a local directory, and the option binary must be * enabled, which is required to support resuming of downloads. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer * * @param resumeDownload the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder resumeDownload(String resumeDownload) { doSetProperty("resumeDownload", resumeDownload); return this; } /** * If the polling consumer did not poll any files, you can enable this * option to send an empty message (no body) instead. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer * * @param sendEmptyMessageWhenIdle the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder sendEmptyMessageWhenIdle( boolean sendEmptyMessageWhenIdle) { doSetProperty("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle); return this; } /** * If the polling consumer did not poll any files, you can enable this * option to send an empty message (no body) instead. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer * * @param sendEmptyMessageWhenIdle the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder sendEmptyMessageWhenIdle( String sendEmptyMessageWhenIdle) { doSetProperty("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle); return this; } /** * Sets the download method to use when not using a local working * directory. If set to true, the remote files are streamed to the route * as they are read. When set to false, the remote files are loaded into * memory before being sent into the route. If enabling this option then * you must set stepwise=false as both cannot be enabled at the same * time. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer * * @param streamDownload the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder streamDownload(boolean streamDownload) { doSetProperty("streamDownload", streamDownload); return this; } /** * Sets the download method to use when not using a local working * directory. If set to true, the remote files are streamed to the route * as they are read. When set to false, the remote files are loaded into * memory before being sent into the route. If enabling this option then * you must set stepwise=false as both cannot be enabled at the same * time. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer * * @param streamDownload the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder streamDownload(String streamDownload) { doSetProperty("streamDownload", streamDownload); return this; } /** * Ant style filter exclusion. If both antInclude and antExclude are * used, antExclude takes precedence over antInclude. Multiple * exclusions may be specified in comma-delimited format. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: filter * * @param antExclude the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder antExclude(String antExclude) { doSetProperty("antExclude", antExclude); return this; } /** * Sets case sensitive flag on ant filter. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: filter * * @param antFilterCaseSensitive the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder antFilterCaseSensitive( boolean antFilterCaseSensitive) { doSetProperty("antFilterCaseSensitive", antFilterCaseSensitive); return this; } /** * Sets case sensitive flag on ant filter. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: filter * * @param antFilterCaseSensitive the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder antFilterCaseSensitive( String antFilterCaseSensitive) { doSetProperty("antFilterCaseSensitive", antFilterCaseSensitive); return this; } /** * Ant style filter inclusion. Multiple inclusions may be specified in * comma-delimited format. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: filter * * @param antInclude the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder antInclude(String antInclude) { doSetProperty("antInclude", antInclude); return this; } /** * Allows for controlling whether the limit from maxMessagesPerPoll is * eager or not. If eager then the limit is during the scanning of * files. Where as false would scan all files, and then perform sorting. * Setting this option to false allows for sorting all files first, and * then limit the poll. Mind that this requires a higher memory usage as * all file details are in memory to perform the sorting. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: filter * * @param eagerMaxMessagesPerPoll the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder eagerMaxMessagesPerPoll( boolean eagerMaxMessagesPerPoll) { doSetProperty("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll); return this; } /** * Allows for controlling whether the limit from maxMessagesPerPoll is * eager or not. If eager then the limit is during the scanning of * files. Where as false would scan all files, and then perform sorting. * Setting this option to false allows for sorting all files first, and * then limit the poll. Mind that this requires a higher memory usage as * all file details are in memory to perform the sorting. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: filter * * @param eagerMaxMessagesPerPoll the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder eagerMaxMessagesPerPoll( String eagerMaxMessagesPerPoll) { doSetProperty("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll); return this; } /** * Is used to exclude files, if filename matches the regex pattern * (matching is case in-sensitive). Notice if you use symbols such as * plus sign and others you would need to configure this using the RAW() * syntax if configuring this as an endpoint uri. See more details at * configuring endpoint uris. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: filter * * @param exclude the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder exclude(String exclude) { doSetProperty("exclude", exclude); return this; } /** * Is used to exclude files matching file extension name (case * insensitive). For example to exclude bak files, then use * excludeExt=bak. Multiple extensions can be separated by comma, for * example to exclude bak and dat files, use excludeExt=bak,dat. Note * that the file extension includes all parts, for example having a file * named mydata.tar.gz will have extension as tar.gz. For more * flexibility then use the include/exclude options. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: filter * * @param excludeExt the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder excludeExt(String excludeExt) { doSetProperty("excludeExt", excludeExt); return this; } /** * Pluggable filter as a * org.apache.camel.component.file.GenericFileFilter class. Will skip * files if filter returns false in its accept() method. * * The option is a: * &lt;code&gt;org.apache.camel.component.file.GenericFileFilter&amp;lt;org.apache.commons.net.ftp.FTPFile&amp;gt;&lt;/code&gt; type. * * Group: filter * * @param filter the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder filter( org.apache.camel.component.file.GenericFileFilter<org.apache.commons.net.ftp.FTPFile> filter) { doSetProperty("filter", filter); return this; } /** * Pluggable filter as a * org.apache.camel.component.file.GenericFileFilter class. Will skip * files if filter returns false in its accept() method. * * The option will be converted to a * &lt;code&gt;org.apache.camel.component.file.GenericFileFilter&amp;lt;org.apache.commons.net.ftp.FTPFile&amp;gt;&lt;/code&gt; type. * * Group: filter * * @param filter the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder filter(String filter) { doSetProperty("filter", filter); return this; } /** * Filters the directory based on Simple language. For example to filter * on current date, you can use a simple date pattern such as * ${date:now:yyyMMdd}. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: filter * * @param filterDirectory the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder filterDirectory( String filterDirectory) { doSetProperty("filterDirectory", filterDirectory); return this; } /** * Filters the file based on Simple language. For example to filter on * file size, you can use ${file:size} 5000. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: filter * * @param filterFile the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder filterFile(String filterFile) { doSetProperty("filterFile", filterFile); return this; } /** * Option to use the Idempotent Consumer EIP pattern to let Camel skip * already processed files. Will by default use a memory based LRUCache * that holds 1000 entries. If noop=true then idempotent will be enabled * as well to avoid consuming the same files over and over again. * * The option is a: &lt;code&gt;java.lang.Boolean&lt;/code&gt; type. * * Default: false * Group: filter * * @param idempotent the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder idempotent(Boolean idempotent) { doSetProperty("idempotent", idempotent); return this; } /** * Option to use the Idempotent Consumer EIP pattern to let Camel skip * already processed files. Will by default use a memory based LRUCache * that holds 1000 entries. If noop=true then idempotent will be enabled * as well to avoid consuming the same files over and over again. * * The option will be converted to a * &lt;code&gt;java.lang.Boolean&lt;/code&gt; type. * * Default: false * Group: filter * * @param idempotent the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder idempotent(String idempotent) { doSetProperty("idempotent", idempotent); return this; } /** * To use a custom idempotent key. By default the absolute path of the * file is used. You can use the File Language, for example to use the * file name and file size, you can do: * idempotentKey=${file:name}-${file:size}. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: filter * * @param idempotentKey the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder idempotentKey(String idempotentKey) { doSetProperty("idempotentKey", idempotentKey); return this; } /** * A pluggable repository org.apache.camel.spi.IdempotentRepository * which by default use MemoryIdempotentRepository if none is specified * and idempotent is true. * * The option is a: * &lt;code&gt;org.apache.camel.spi.IdempotentRepository&lt;/code&gt; * type. * * Group: filter * * @param idempotentRepository the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder idempotentRepository( org.apache.camel.spi.IdempotentRepository idempotentRepository) { doSetProperty("idempotentRepository", idempotentRepository); return this; } /** * A pluggable repository org.apache.camel.spi.IdempotentRepository * which by default use MemoryIdempotentRepository if none is specified * and idempotent is true. * * The option will be converted to a * &lt;code&gt;org.apache.camel.spi.IdempotentRepository&lt;/code&gt; * type. * * Group: filter * * @param idempotentRepository the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder idempotentRepository( String idempotentRepository) { doSetProperty("idempotentRepository", idempotentRepository); return this; } /** * Is used to include files, if filename matches the regex pattern * (matching is case in-sensitive). Notice if you use symbols such as * plus sign and others you would need to configure this using the RAW() * syntax if configuring this as an endpoint uri. See more details at * configuring endpoint uris. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: filter * * @param include the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder include(String include) { doSetProperty("include", include); return this; } /** * Is used to include files matching file extension name (case * insensitive). For example to include txt files, then use * includeExt=txt. Multiple extensions can be separated by comma, for * example to include txt and xml files, use includeExt=txt,xml. Note * that the file extension includes all parts, for example having a file * named mydata.tar.gz will have extension as tar.gz. For more * flexibility then use the include/exclude options. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: filter * * @param includeExt the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder includeExt(String includeExt) { doSetProperty("includeExt", includeExt); return this; } /** * The maximum depth to traverse when recursively processing a * directory. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 2147483647 * Group: filter * * @param maxDepth the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder maxDepth(int maxDepth) { doSetProperty("maxDepth", maxDepth); return this; } /** * The maximum depth to traverse when recursively processing a * directory. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 2147483647 * Group: filter * * @param maxDepth the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder maxDepth(String maxDepth) { doSetProperty("maxDepth", maxDepth); return this; } /** * To define a maximum messages to gather per poll. By default no * maximum is set. Can be used to set a limit of e.g. 1000 to avoid when * starting up the server that there are thousands of files. Set a value * of 0 or negative to disabled it. Notice: If this option is in use * then the File and FTP components will limit before any sorting. For * example if you have 100000 files and use maxMessagesPerPoll=500, then * only the first 500 files will be picked up, and then sorted. You can * use the eagerMaxMessagesPerPoll option and set this to false to allow * to scan all files first and then sort afterwards. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Group: filter * * @param maxMessagesPerPoll the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder maxMessagesPerPoll( int maxMessagesPerPoll) { doSetProperty("maxMessagesPerPoll", maxMessagesPerPoll); return this; } /** * To define a maximum messages to gather per poll. By default no * maximum is set. Can be used to set a limit of e.g. 1000 to avoid when * starting up the server that there are thousands of files. Set a value * of 0 or negative to disabled it. Notice: If this option is in use * then the File and FTP components will limit before any sorting. For * example if you have 100000 files and use maxMessagesPerPoll=500, then * only the first 500 files will be picked up, and then sorted. You can * use the eagerMaxMessagesPerPoll option and set this to false to allow * to scan all files first and then sort afterwards. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Group: filter * * @param maxMessagesPerPoll the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder maxMessagesPerPoll( String maxMessagesPerPoll) { doSetProperty("maxMessagesPerPoll", maxMessagesPerPoll); return this; } /** * The minimum depth to start processing when recursively processing a * directory. Using minDepth=1 means the base directory. Using * minDepth=2 means the first sub directory. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Group: filter * * @param minDepth the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder minDepth(int minDepth) { doSetProperty("minDepth", minDepth); return this; } /** * The minimum depth to start processing when recursively processing a * directory. Using minDepth=1 means the base directory. Using * minDepth=2 means the first sub directory. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Group: filter * * @param minDepth the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder minDepth(String minDepth) { doSetProperty("minDepth", minDepth); return this; } /** * Expression (such as Simple Language) used to dynamically set the * filename when moving it after processing. To move files into a .done * subdirectory just enter .done. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: filter * * @param move the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder move(String move) { doSetProperty("move", move); return this; } /** * Pluggable read-lock as a * org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy * implementation. * * The option is a: * &lt;code&gt;org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy&amp;lt;org.apache.commons.net.ftp.FTPFile&amp;gt;&lt;/code&gt; type. * * Group: lock * * @param exclusiveReadLockStrategy the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder exclusiveReadLockStrategy( org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy<org.apache.commons.net.ftp.FTPFile> exclusiveReadLockStrategy) { doSetProperty("exclusiveReadLockStrategy", exclusiveReadLockStrategy); return this; } /** * Pluggable read-lock as a * org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy * implementation. * * The option will be converted to a * &lt;code&gt;org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy&amp;lt;org.apache.commons.net.ftp.FTPFile&amp;gt;&lt;/code&gt; type. * * Group: lock * * @param exclusiveReadLockStrategy the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder exclusiveReadLockStrategy( String exclusiveReadLockStrategy) { doSetProperty("exclusiveReadLockStrategy", exclusiveReadLockStrategy); return this; } /** * Used by consumer, to only poll the files if it has exclusive * read-lock on the file (i.e. the file is not in-progress or being * written). Camel will wait until the file lock is granted. This option * provides the build in strategies: - none - No read lock is in use - * markerFile - Camel creates a marker file (fileName.camelLock) and * then holds a lock on it. This option is not available for the FTP * component - changed - Changed is using file length/modification * timestamp to detect whether the file is currently being copied or * not. Will at least use 1 sec to determine this, so this option cannot * consume files as fast as the others, but can be more reliable as the * JDK IO API cannot always determine whether a file is currently being * used by another process. The option readLockCheckInterval can be used * to set the check frequency. - fileLock - is for using * java.nio.channels.FileLock. This option is not avail for Windows OS * and the FTP component. This approach should be avoided when accessing * a remote file system via a mount/share unless that file system * supports distributed file locks. - rename - rename is for using a try * to rename the file as a test if we can get exclusive read-lock. - * idempotent - (only for file component) idempotent is for using a * idempotentRepository as the read-lock. This allows to use read locks * that supports clustering if the idempotent repository implementation * supports that. - idempotent-changed - (only for file component) * idempotent-changed is for using a idempotentRepository and changed as * the combined read-lock. This allows to use read locks that supports * clustering if the idempotent repository implementation supports that. * - idempotent-rename - (only for file component) idempotent-rename is * for using a idempotentRepository and rename as the combined * read-lock. This allows to use read locks that supports clustering if * the idempotent repository implementation supports that.Notice: The * various read locks is not all suited to work in clustered mode, where * concurrent consumers on different nodes is competing for the same * files on a shared file system. The markerFile using a close to atomic * operation to create the empty marker file, but its not guaranteed to * work in a cluster. The fileLock may work better but then the file * system need to support distributed file locks, and so on. Using the * idempotent read lock can support clustering if the idempotent * repository supports clustering, such as Hazelcast Component or * Infinispan. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Default: none * Group: lock * * @param readLock the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLock(String readLock) { doSetProperty("readLock", readLock); return this; } /** * Interval in millis for the read-lock, if supported by the read lock. * This interval is used for sleeping between attempts to acquire the * read lock. For example when using the changed read lock, you can set * a higher interval period to cater for slow writes. The default of 1 * sec. may be too fast if the producer is very slow writing the file. * Notice: For FTP the default readLockCheckInterval is 5000. The * readLockTimeout value must be higher than readLockCheckInterval, but * a rule of thumb is to have a timeout that is at least 2 or more times * higher than the readLockCheckInterval. This is needed to ensure that * amble time is allowed for the read lock process to try to grab the * lock before the timeout was hit. * * The option is a: &lt;code&gt;long&lt;/code&gt; type. * * Default: 1000 * Group: lock * * @param readLockCheckInterval the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockCheckInterval( long readLockCheckInterval) { doSetProperty("readLockCheckInterval", readLockCheckInterval); return this; } /** * Interval in millis for the read-lock, if supported by the read lock. * This interval is used for sleeping between attempts to acquire the * read lock. For example when using the changed read lock, you can set * a higher interval period to cater for slow writes. The default of 1 * sec. may be too fast if the producer is very slow writing the file. * Notice: For FTP the default readLockCheckInterval is 5000. The * readLockTimeout value must be higher than readLockCheckInterval, but * a rule of thumb is to have a timeout that is at least 2 or more times * higher than the readLockCheckInterval. This is needed to ensure that * amble time is allowed for the read lock process to try to grab the * lock before the timeout was hit. * * The option will be converted to a &lt;code&gt;long&lt;/code&gt; type. * * Default: 1000 * Group: lock * * @param readLockCheckInterval the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockCheckInterval( String readLockCheckInterval) { doSetProperty("readLockCheckInterval", readLockCheckInterval); return this; } /** * Whether or not read lock with marker files should upon startup delete * any orphan read lock files, which may have been left on the file * system, if Camel was not properly shutdown (such as a JVM crash). If * turning this option to false then any orphaned lock file will cause * Camel to not attempt to pickup that file, this could also be due * another node is concurrently reading files from the same shared * directory. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: lock * * @param readLockDeleteOrphanLockFiles the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockDeleteOrphanLockFiles( boolean readLockDeleteOrphanLockFiles) { doSetProperty("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles); return this; } /** * Whether or not read lock with marker files should upon startup delete * any orphan read lock files, which may have been left on the file * system, if Camel was not properly shutdown (such as a JVM crash). If * turning this option to false then any orphaned lock file will cause * Camel to not attempt to pickup that file, this could also be due * another node is concurrently reading files from the same shared * directory. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: lock * * @param readLockDeleteOrphanLockFiles the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockDeleteOrphanLockFiles( String readLockDeleteOrphanLockFiles) { doSetProperty("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles); return this; } /** * Logging level used when a read lock could not be acquired. By default * a DEBUG is logged. You can change this level, for example to OFF to * not have any logging. This option is only applicable for readLock of * types: changed, fileLock, idempotent, idempotent-changed, * idempotent-rename, rename. * * The option is a: * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: DEBUG * Group: lock * * @param readLockLoggingLevel the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockLoggingLevel( org.apache.camel.LoggingLevel readLockLoggingLevel) { doSetProperty("readLockLoggingLevel", readLockLoggingLevel); return this; } /** * Logging level used when a read lock could not be acquired. By default * a DEBUG is logged. You can change this level, for example to OFF to * not have any logging. This option is only applicable for readLock of * types: changed, fileLock, idempotent, idempotent-changed, * idempotent-rename, rename. * * The option will be converted to a * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: DEBUG * Group: lock * * @param readLockLoggingLevel the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockLoggingLevel( String readLockLoggingLevel) { doSetProperty("readLockLoggingLevel", readLockLoggingLevel); return this; } /** * Whether to use marker file with the changed, rename, or exclusive * read lock types. By default a marker file is used as well to guard * against other processes picking up the same files. This behavior can * be turned off by setting this option to false. For example if you do * not want to write marker files to the file systems by the Camel * application. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: lock * * @param readLockMarkerFile the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockMarkerFile( boolean readLockMarkerFile) { doSetProperty("readLockMarkerFile", readLockMarkerFile); return this; } /** * Whether to use marker file with the changed, rename, or exclusive * read lock types. By default a marker file is used as well to guard * against other processes picking up the same files. This behavior can * be turned off by setting this option to false. For example if you do * not want to write marker files to the file systems by the Camel * application. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: lock * * @param readLockMarkerFile the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockMarkerFile( String readLockMarkerFile) { doSetProperty("readLockMarkerFile", readLockMarkerFile); return this; } /** * This option is applied only for readLock=changed. It allows to * specify a minimum age the file must be before attempting to acquire * the read lock. For example use readLockMinAge=300s to require the * file is at last 5 minutes old. This can speedup the changed read lock * as it will only attempt to acquire files which are at least that * given age. * * The option is a: &lt;code&gt;long&lt;/code&gt; type. * * Default: 0 * Group: lock * * @param readLockMinAge the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockMinAge(long readLockMinAge) { doSetProperty("readLockMinAge", readLockMinAge); return this; } /** * This option is applied only for readLock=changed. It allows to * specify a minimum age the file must be before attempting to acquire * the read lock. For example use readLockMinAge=300s to require the * file is at last 5 minutes old. This can speedup the changed read lock * as it will only attempt to acquire files which are at least that * given age. * * The option will be converted to a &lt;code&gt;long&lt;/code&gt; type. * * Default: 0 * Group: lock * * @param readLockMinAge the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockMinAge(String readLockMinAge) { doSetProperty("readLockMinAge", readLockMinAge); return this; } /** * This option is applied only for readLock=changed. It allows you to * configure a minimum file length. By default Camel expects the file to * contain data, and thus the default value is 1. You can set this * option to zero, to allow consuming zero-length files. * * The option is a: &lt;code&gt;long&lt;/code&gt; type. * * Default: 1 * Group: lock * * @param readLockMinLength the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockMinLength( long readLockMinLength) { doSetProperty("readLockMinLength", readLockMinLength); return this; } /** * This option is applied only for readLock=changed. It allows you to * configure a minimum file length. By default Camel expects the file to * contain data, and thus the default value is 1. You can set this * option to zero, to allow consuming zero-length files. * * The option will be converted to a &lt;code&gt;long&lt;/code&gt; type. * * Default: 1 * Group: lock * * @param readLockMinLength the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockMinLength( String readLockMinLength) { doSetProperty("readLockMinLength", readLockMinLength); return this; } /** * This option is applied only for readLock=idempotent. It allows to * specify whether to remove the file name entry from the idempotent * repository when processing the file is succeeded and a commit * happens. By default the file is not removed which ensures that any * race-condition do not occur so another active node may attempt to * grab the file. Instead the idempotent repository may support eviction * strategies that you can configure to evict the file name entry after * X minutes - this ensures no problems with race conditions. See more * details at the readLockIdempotentReleaseDelay option. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: lock * * @param readLockRemoveOnCommit the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockRemoveOnCommit( boolean readLockRemoveOnCommit) { doSetProperty("readLockRemoveOnCommit", readLockRemoveOnCommit); return this; } /** * This option is applied only for readLock=idempotent. It allows to * specify whether to remove the file name entry from the idempotent * repository when processing the file is succeeded and a commit * happens. By default the file is not removed which ensures that any * race-condition do not occur so another active node may attempt to * grab the file. Instead the idempotent repository may support eviction * strategies that you can configure to evict the file name entry after * X minutes - this ensures no problems with race conditions. See more * details at the readLockIdempotentReleaseDelay option. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: lock * * @param readLockRemoveOnCommit the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockRemoveOnCommit( String readLockRemoveOnCommit) { doSetProperty("readLockRemoveOnCommit", readLockRemoveOnCommit); return this; } /** * This option is applied only for readLock=idempotent. It allows to * specify whether to remove the file name entry from the idempotent * repository when processing the file failed and a rollback happens. If * this option is false, then the file name entry is confirmed (as if * the file did a commit). * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: lock * * @param readLockRemoveOnRollback the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockRemoveOnRollback( boolean readLockRemoveOnRollback) { doSetProperty("readLockRemoveOnRollback", readLockRemoveOnRollback); return this; } /** * This option is applied only for readLock=idempotent. It allows to * specify whether to remove the file name entry from the idempotent * repository when processing the file failed and a rollback happens. If * this option is false, then the file name entry is confirmed (as if * the file did a commit). * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: lock * * @param readLockRemoveOnRollback the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockRemoveOnRollback( String readLockRemoveOnRollback) { doSetProperty("readLockRemoveOnRollback", readLockRemoveOnRollback); return this; } /** * Optional timeout in millis for the read-lock, if supported by the * read-lock. If the read-lock could not be granted and the timeout * triggered, then Camel will skip the file. At next poll Camel, will * try the file again, and this time maybe the read-lock could be * granted. Use a value of 0 or lower to indicate forever. Currently * fileLock, changed and rename support the timeout. Notice: For FTP the * default readLockTimeout value is 20000 instead of 10000. The * readLockTimeout value must be higher than readLockCheckInterval, but * a rule of thumb is to have a timeout that is at least 2 or more times * higher than the readLockCheckInterval. This is needed to ensure that * amble time is allowed for the read lock process to try to grab the * lock before the timeout was hit. * * The option is a: &lt;code&gt;long&lt;/code&gt; type. * * Default: 10000 * Group: lock * * @param readLockTimeout the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockTimeout(long readLockTimeout) { doSetProperty("readLockTimeout", readLockTimeout); return this; } /** * Optional timeout in millis for the read-lock, if supported by the * read-lock. If the read-lock could not be granted and the timeout * triggered, then Camel will skip the file. At next poll Camel, will * try the file again, and this time maybe the read-lock could be * granted. Use a value of 0 or lower to indicate forever. Currently * fileLock, changed and rename support the timeout. Notice: For FTP the * default readLockTimeout value is 20000 instead of 10000. The * readLockTimeout value must be higher than readLockCheckInterval, but * a rule of thumb is to have a timeout that is at least 2 or more times * higher than the readLockCheckInterval. This is needed to ensure that * amble time is allowed for the read lock process to try to grab the * lock before the timeout was hit. * * The option will be converted to a &lt;code&gt;long&lt;/code&gt; type. * * Default: 10000 * Group: lock * * @param readLockTimeout the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder readLockTimeout( String readLockTimeout) { doSetProperty("readLockTimeout", readLockTimeout); return this; } /** * The number of subsequent error polls (failed due some error) that * should happen before the backoffMultipler should kick-in. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Group: scheduler * * @param backoffErrorThreshold the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder backoffErrorThreshold( int backoffErrorThreshold) { doSetProperty("backoffErrorThreshold", backoffErrorThreshold); return this; } /** * The number of subsequent error polls (failed due some error) that * should happen before the backoffMultipler should kick-in. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Group: scheduler * * @param backoffErrorThreshold the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder backoffErrorThreshold( String backoffErrorThreshold) { doSetProperty("backoffErrorThreshold", backoffErrorThreshold); return this; } /** * The number of subsequent idle polls that should happen before the * backoffMultipler should kick-in. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Group: scheduler * * @param backoffIdleThreshold the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder backoffIdleThreshold( int backoffIdleThreshold) { doSetProperty("backoffIdleThreshold", backoffIdleThreshold); return this; } /** * The number of subsequent idle polls that should happen before the * backoffMultipler should kick-in. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Group: scheduler * * @param backoffIdleThreshold the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder backoffIdleThreshold( String backoffIdleThreshold) { doSetProperty("backoffIdleThreshold", backoffIdleThreshold); return this; } /** * To let the scheduled polling consumer backoff if there has been a * number of subsequent idles/errors in a row. The multiplier is then * the number of polls that will be skipped before the next actual * attempt is happening again. When this option is in use then * backoffIdleThreshold and/or backoffErrorThreshold must also be * configured. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Group: scheduler * * @param backoffMultiplier the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder backoffMultiplier( int backoffMultiplier) { doSetProperty("backoffMultiplier", backoffMultiplier); return this; } /** * To let the scheduled polling consumer backoff if there has been a * number of subsequent idles/errors in a row. The multiplier is then * the number of polls that will be skipped before the next actual * attempt is happening again. When this option is in use then * backoffIdleThreshold and/or backoffErrorThreshold must also be * configured. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Group: scheduler * * @param backoffMultiplier the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder backoffMultiplier( String backoffMultiplier) { doSetProperty("backoffMultiplier", backoffMultiplier); return this; } /** * Milliseconds before the next poll. * * The option is a: &lt;code&gt;long&lt;/code&gt; type. * * Default: 500 * Group: scheduler * * @param delay the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder delay(long delay) { doSetProperty("delay", delay); return this; } /** * Milliseconds before the next poll. * * The option will be converted to a &lt;code&gt;long&lt;/code&gt; type. * * Default: 500 * Group: scheduler * * @param delay the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder delay(String delay) { doSetProperty("delay", delay); return this; } /** * If greedy is enabled, then the ScheduledPollConsumer will run * immediately again, if the previous run polled 1 or more messages. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: scheduler * * @param greedy the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder greedy(boolean greedy) { doSetProperty("greedy", greedy); return this; } /** * If greedy is enabled, then the ScheduledPollConsumer will run * immediately again, if the previous run polled 1 or more messages. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: scheduler * * @param greedy the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder greedy(String greedy) { doSetProperty("greedy", greedy); return this; } /** * Milliseconds before the first poll starts. * * The option is a: &lt;code&gt;long&lt;/code&gt; type. * * Default: 1000 * Group: scheduler * * @param initialDelay the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder initialDelay(long initialDelay) { doSetProperty("initialDelay", initialDelay); return this; } /** * Milliseconds before the first poll starts. * * The option will be converted to a &lt;code&gt;long&lt;/code&gt; type. * * Default: 1000 * Group: scheduler * * @param initialDelay the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder initialDelay(String initialDelay) { doSetProperty("initialDelay", initialDelay); return this; } /** * Specifies a maximum limit of number of fires. So if you set it to 1, * the scheduler will only fire once. If you set it to 5, it will only * fire five times. A value of zero or negative means fire forever. * * The option is a: &lt;code&gt;long&lt;/code&gt; type. * * Default: 0 * Group: scheduler * * @param repeatCount the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder repeatCount(long repeatCount) { doSetProperty("repeatCount", repeatCount); return this; } /** * Specifies a maximum limit of number of fires. So if you set it to 1, * the scheduler will only fire once. If you set it to 5, it will only * fire five times. A value of zero or negative means fire forever. * * The option will be converted to a &lt;code&gt;long&lt;/code&gt; type. * * Default: 0 * Group: scheduler * * @param repeatCount the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder repeatCount(String repeatCount) { doSetProperty("repeatCount", repeatCount); return this; } /** * The consumer logs a start/complete log line when it polls. This * option allows you to configure the logging level for that. * * The option is a: * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: TRACE * Group: scheduler * * @param runLoggingLevel the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder runLoggingLevel( org.apache.camel.LoggingLevel runLoggingLevel) { doSetProperty("runLoggingLevel", runLoggingLevel); return this; } /** * The consumer logs a start/complete log line when it polls. This * option allows you to configure the logging level for that. * * The option will be converted to a * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: TRACE * Group: scheduler * * @param runLoggingLevel the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder runLoggingLevel( String runLoggingLevel) { doSetProperty("runLoggingLevel", runLoggingLevel); return this; } /** * Allows for configuring a custom/shared thread pool to use for the * consumer. By default each consumer has its own single threaded thread * pool. * * The option is a: * &lt;code&gt;java.util.concurrent.ScheduledExecutorService&lt;/code&gt; type. * * Group: scheduler * * @param scheduledExecutorService the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder scheduledExecutorService( ScheduledExecutorService scheduledExecutorService) { doSetProperty("scheduledExecutorService", scheduledExecutorService); return this; } /** * Allows for configuring a custom/shared thread pool to use for the * consumer. By default each consumer has its own single threaded thread * pool. * * The option will be converted to a * &lt;code&gt;java.util.concurrent.ScheduledExecutorService&lt;/code&gt; type. * * Group: scheduler * * @param scheduledExecutorService the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder scheduledExecutorService( String scheduledExecutorService) { doSetProperty("scheduledExecutorService", scheduledExecutorService); return this; } /** * To use a cron scheduler from either camel-spring or camel-quartz * component. Use value spring or quartz for built in scheduler. * * The option is a: &lt;code&gt;java.lang.Object&lt;/code&gt; type. * * Default: none * Group: scheduler * * @param scheduler the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder scheduler(Object scheduler) { doSetProperty("scheduler", scheduler); return this; } /** * To use a cron scheduler from either camel-spring or camel-quartz * component. Use value spring or quartz for built in scheduler. * * The option will be converted to a * &lt;code&gt;java.lang.Object&lt;/code&gt; type. * * Default: none * Group: scheduler * * @param scheduler the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder scheduler(String scheduler) { doSetProperty("scheduler", scheduler); return this; } /** * To configure additional properties when using a custom scheduler or * any of the Quartz, Spring based scheduler. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * schedulerProperties(String, Object) method to add a value (call the * method multiple times to set more values). * * Group: scheduler * * @param key the option key * @param value the option value * @return the dsl builder */ default FtpEndpointConsumerBuilder schedulerProperties( String key, Object value) { doSetMultiValueProperty("schedulerProperties", "scheduler." + key, value); return this; } /** * To configure additional properties when using a custom scheduler or * any of the Quartz, Spring based scheduler. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * schedulerProperties(String, Object) method to add a value (call the * method multiple times to set more values). * * Group: scheduler * * @param values the values * @return the dsl builder */ default FtpEndpointConsumerBuilder schedulerProperties(Map values) { doSetMultiValueProperties("schedulerProperties", "scheduler.", values); return this; } /** * Whether the scheduler should be auto started. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: scheduler * * @param startScheduler the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder startScheduler(boolean startScheduler) { doSetProperty("startScheduler", startScheduler); return this; } /** * Whether the scheduler should be auto started. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: scheduler * * @param startScheduler the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder startScheduler(String startScheduler) { doSetProperty("startScheduler", startScheduler); return this; } /** * Time unit for initialDelay and delay options. * * The option is a: * &lt;code&gt;java.util.concurrent.TimeUnit&lt;/code&gt; type. * * Default: MILLISECONDS * Group: scheduler * * @param timeUnit the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder timeUnit(TimeUnit timeUnit) { doSetProperty("timeUnit", timeUnit); return this; } /** * Time unit for initialDelay and delay options. * * The option will be converted to a * &lt;code&gt;java.util.concurrent.TimeUnit&lt;/code&gt; type. * * Default: MILLISECONDS * Group: scheduler * * @param timeUnit the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder timeUnit(String timeUnit) { doSetProperty("timeUnit", timeUnit); return this; } /** * Controls if fixed delay or fixed rate is used. See * ScheduledExecutorService in JDK for details. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: scheduler * * @param useFixedDelay the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder useFixedDelay(boolean useFixedDelay) { doSetProperty("useFixedDelay", useFixedDelay); return this; } /** * Controls if fixed delay or fixed rate is used. See * ScheduledExecutorService in JDK for details. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: scheduler * * @param useFixedDelay the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder useFixedDelay(String useFixedDelay) { doSetProperty("useFixedDelay", useFixedDelay); return this; } /** * Account to use for login. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: security * * @param account the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder account(String account) { doSetProperty("account", account); return this; } /** * Password to use for login. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: security * * @param password the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder password(String password) { doSetProperty("password", password); return this; } /** * Username to use for login. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: security * * @param username the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder username(String username) { doSetProperty("username", username); return this; } /** * To shuffle the list of files (sort in random order). * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: sort * * @param shuffle the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder shuffle(boolean shuffle) { doSetProperty("shuffle", shuffle); return this; } /** * To shuffle the list of files (sort in random order). * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: sort * * @param shuffle the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder shuffle(String shuffle) { doSetProperty("shuffle", shuffle); return this; } /** * Built-in sort by using the File Language. Supports nested sorts, so * you can have a sort by file name and as a 2nd group sort by modified * date. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: sort * * @param sortBy the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder sortBy(String sortBy) { doSetProperty("sortBy", sortBy); return this; } /** * Pluggable sorter as a java.util.Comparator class. * * The option is a: * &lt;code&gt;java.util.Comparator&amp;lt;org.apache.camel.component.file.GenericFile&amp;lt;org.apache.commons.net.ftp.FTPFile&amp;gt;&amp;gt;&lt;/code&gt; type. * * Group: sort * * @param sorter the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder sorter( Comparator<org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile>> sorter) { doSetProperty("sorter", sorter); return this; } /** * Pluggable sorter as a java.util.Comparator class. * * The option will be converted to a * &lt;code&gt;java.util.Comparator&amp;lt;org.apache.camel.component.file.GenericFile&amp;lt;org.apache.commons.net.ftp.FTPFile&amp;gt;&amp;gt;&lt;/code&gt; type. * * Group: sort * * @param sorter the value to set * @return the dsl builder */ default FtpEndpointConsumerBuilder sorter(String sorter) { doSetProperty("sorter", sorter); return this; } } /** * Advanced builder for endpoint consumers for the FTP component. */ public interface AdvancedFtpEndpointConsumerBuilder extends EndpointConsumerBuilder { default FtpEndpointConsumerBuilder basic() { return (FtpEndpointConsumerBuilder) this; } /** * If set this option to be true, camel-ftp will use the list file * directly to check if the file exists. Since some FTP server may not * support to list the file directly, if the option is false, camel-ftp * will use the old way to list the directory and check if the file * exists. This option also influences readLock=changed to control * whether it performs a fast check to update file information or not. * This can be used to speed up the process if the FTP server has a lot * of files. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common (advanced) * * @param fastExistsCheck the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder fastExistsCheck( boolean fastExistsCheck) { doSetProperty("fastExistsCheck", fastExistsCheck); return this; } /** * If set this option to be true, camel-ftp will use the list file * directly to check if the file exists. Since some FTP server may not * support to list the file directly, if the option is false, camel-ftp * will use the old way to list the directory and check if the file * exists. This option also influences readLock=changed to control * whether it performs a fast check to update file information or not. * This can be used to speed up the process if the FTP server has a lot * of files. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common (advanced) * * @param fastExistsCheck the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder fastExistsCheck( String fastExistsCheck) { doSetProperty("fastExistsCheck", fastExistsCheck); return this; } /** * Allows for bridging the consumer to the Camel routing Error Handler, * which mean any exceptions occurred while the consumer is trying to * pickup incoming messages, or the likes, will now be processed as a * message and handled by the routing Error Handler. By default the * consumer will use the org.apache.camel.spi.ExceptionHandler to deal * with exceptions, that will be logged at WARN or ERROR level and * ignored. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer (advanced) * * @param bridgeErrorHandler the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder bridgeErrorHandler( boolean bridgeErrorHandler) { doSetProperty("bridgeErrorHandler", bridgeErrorHandler); return this; } /** * Allows for bridging the consumer to the Camel routing Error Handler, * which mean any exceptions occurred while the consumer is trying to * pickup incoming messages, or the likes, will now be processed as a * message and handled by the routing Error Handler. By default the * consumer will use the org.apache.camel.spi.ExceptionHandler to deal * with exceptions, that will be logged at WARN or ERROR level and * ignored. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer (advanced) * * @param bridgeErrorHandler the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder bridgeErrorHandler( String bridgeErrorHandler) { doSetProperty("bridgeErrorHandler", bridgeErrorHandler); return this; } /** * Whether the FTP consumer should download the file. If this option is * set to false, then the message body will be null, but the consumer * will still trigger a Camel Exchange that has details about the file * such as file name, file size, etc. It's just that the file will not * be downloaded. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer (advanced) * * @param download the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder download(boolean download) { doSetProperty("download", download); return this; } /** * Whether the FTP consumer should download the file. If this option is * set to false, then the message body will be null, but the consumer * will still trigger a Camel Exchange that has details about the file * such as file name, file size, etc. It's just that the file will not * be downloaded. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer (advanced) * * @param download the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder download(String download) { doSetProperty("download", download); return this; } /** * To let the consumer use a custom ExceptionHandler. Notice if the * option bridgeErrorHandler is enabled then this option is not in use. * By default the consumer will deal with exceptions, that will be * logged at WARN or ERROR level and ignored. * * The option is a: * &lt;code&gt;org.apache.camel.spi.ExceptionHandler&lt;/code&gt; type. * * Group: consumer (advanced) * * @param exceptionHandler the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder exceptionHandler( org.apache.camel.spi.ExceptionHandler exceptionHandler) { doSetProperty("exceptionHandler", exceptionHandler); return this; } /** * To let the consumer use a custom ExceptionHandler. Notice if the * option bridgeErrorHandler is enabled then this option is not in use. * By default the consumer will deal with exceptions, that will be * logged at WARN or ERROR level and ignored. * * The option will be converted to a * &lt;code&gt;org.apache.camel.spi.ExceptionHandler&lt;/code&gt; type. * * Group: consumer (advanced) * * @param exceptionHandler the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder exceptionHandler( String exceptionHandler) { doSetProperty("exceptionHandler", exceptionHandler); return this; } /** * Sets the exchange pattern when the consumer creates an exchange. * * The option is a: * &lt;code&gt;org.apache.camel.ExchangePattern&lt;/code&gt; type. * * Group: consumer (advanced) * * @param exchangePattern the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder exchangePattern( org.apache.camel.ExchangePattern exchangePattern) { doSetProperty("exchangePattern", exchangePattern); return this; } /** * Sets the exchange pattern when the consumer creates an exchange. * * The option will be converted to a * &lt;code&gt;org.apache.camel.ExchangePattern&lt;/code&gt; type. * * Group: consumer (advanced) * * @param exchangePattern the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder exchangePattern( String exchangePattern) { doSetProperty("exchangePattern", exchangePattern); return this; } /** * Allows you to set how the consumer will handle subfolders and files * in the path if the directory parser results in with absolute paths * The reason for this is that some FTP servers may return file names * with absolute paths, and if so then the FTP component needs to handle * this by converting the returned path into a relative path. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer (advanced) * * @param handleDirectoryParserAbsoluteResult the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder handleDirectoryParserAbsoluteResult( boolean handleDirectoryParserAbsoluteResult) { doSetProperty("handleDirectoryParserAbsoluteResult", handleDirectoryParserAbsoluteResult); return this; } /** * Allows you to set how the consumer will handle subfolders and files * in the path if the directory parser results in with absolute paths * The reason for this is that some FTP servers may return file names * with absolute paths, and if so then the FTP component needs to handle * this by converting the returned path into a relative path. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer (advanced) * * @param handleDirectoryParserAbsoluteResult the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder handleDirectoryParserAbsoluteResult( String handleDirectoryParserAbsoluteResult) { doSetProperty("handleDirectoryParserAbsoluteResult", handleDirectoryParserAbsoluteResult); return this; } /** * Whether to ignore when (trying to list files in directories or when * downloading a file), which does not exist or due to permission error. * By default when a directory or file does not exists or insufficient * permission, then an exception is thrown. Setting this option to true * allows to ignore that instead. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: consumer (advanced) * * @param ignoreFileNotFoundOrPermissionError the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder ignoreFileNotFoundOrPermissionError( boolean ignoreFileNotFoundOrPermissionError) { doSetProperty("ignoreFileNotFoundOrPermissionError", ignoreFileNotFoundOrPermissionError); return this; } /** * Whether to ignore when (trying to list files in directories or when * downloading a file), which does not exist or due to permission error. * By default when a directory or file does not exists or insufficient * permission, then an exception is thrown. Setting this option to true * allows to ignore that instead. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: consumer (advanced) * * @param ignoreFileNotFoundOrPermissionError the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder ignoreFileNotFoundOrPermissionError( String ignoreFileNotFoundOrPermissionError) { doSetProperty("ignoreFileNotFoundOrPermissionError", ignoreFileNotFoundOrPermissionError); return this; } /** * A pluggable in-progress repository * org.apache.camel.spi.IdempotentRepository. The in-progress repository * is used to account the current in progress files being consumed. By * default a memory based repository is used. * * The option is a: * &lt;code&gt;org.apache.camel.spi.IdempotentRepository&lt;/code&gt; * type. * * Group: consumer (advanced) * * @param inProgressRepository the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder inProgressRepository( org.apache.camel.spi.IdempotentRepository inProgressRepository) { doSetProperty("inProgressRepository", inProgressRepository); return this; } /** * A pluggable in-progress repository * org.apache.camel.spi.IdempotentRepository. The in-progress repository * is used to account the current in progress files being consumed. By * default a memory based repository is used. * * The option will be converted to a * &lt;code&gt;org.apache.camel.spi.IdempotentRepository&lt;/code&gt; * type. * * Group: consumer (advanced) * * @param inProgressRepository the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder inProgressRepository( String inProgressRepository) { doSetProperty("inProgressRepository", inProgressRepository); return this; } /** * When consuming, a local work directory can be used to store the * remote file content directly in local files, to avoid loading the * content into memory. This is beneficial, if you consume a very big * remote file and thus can conserve memory. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: consumer (advanced) * * @param localWorkDirectory the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder localWorkDirectory( String localWorkDirectory) { doSetProperty("localWorkDirectory", localWorkDirectory); return this; } /** * To use a custom org.apache.camel.spi.ExceptionHandler to handle any * thrown exceptions that happens during the file on completion process * where the consumer does either a commit or rollback. The default * implementation will log any exception at WARN level and ignore. * * The option is a: * &lt;code&gt;org.apache.camel.spi.ExceptionHandler&lt;/code&gt; type. * * Group: consumer (advanced) * * @param onCompletionExceptionHandler the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder onCompletionExceptionHandler( org.apache.camel.spi.ExceptionHandler onCompletionExceptionHandler) { doSetProperty("onCompletionExceptionHandler", onCompletionExceptionHandler); return this; } /** * To use a custom org.apache.camel.spi.ExceptionHandler to handle any * thrown exceptions that happens during the file on completion process * where the consumer does either a commit or rollback. The default * implementation will log any exception at WARN level and ignore. * * The option will be converted to a * &lt;code&gt;org.apache.camel.spi.ExceptionHandler&lt;/code&gt; type. * * Group: consumer (advanced) * * @param onCompletionExceptionHandler the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder onCompletionExceptionHandler( String onCompletionExceptionHandler) { doSetProperty("onCompletionExceptionHandler", onCompletionExceptionHandler); return this; } /** * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing * you to provide your custom implementation to control error handling * usually occurred during the poll operation before an Exchange have * been created and being routed in Camel. * * The option is a: * &lt;code&gt;org.apache.camel.spi.PollingConsumerPollStrategy&lt;/code&gt; type. * * Group: consumer (advanced) * * @param pollStrategy the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder pollStrategy( org.apache.camel.spi.PollingConsumerPollStrategy pollStrategy) { doSetProperty("pollStrategy", pollStrategy); return this; } /** * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing * you to provide your custom implementation to control error handling * usually occurred during the poll operation before an Exchange have * been created and being routed in Camel. * * The option will be converted to a * &lt;code&gt;org.apache.camel.spi.PollingConsumerPollStrategy&lt;/code&gt; type. * * Group: consumer (advanced) * * @param pollStrategy the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder pollStrategy( String pollStrategy) { doSetProperty("pollStrategy", pollStrategy); return this; } /** * A pluggable * org.apache.camel.component.file.GenericFileProcessStrategy allowing * you to implement your own readLock option or similar. Can also be * used when special conditions must be met before a file can be * consumed, such as a special ready file exists. If this option is set * then the readLock option does not apply. * * The option is a: * &lt;code&gt;org.apache.camel.component.file.GenericFileProcessStrategy&amp;lt;org.apache.commons.net.ftp.FTPFile&amp;gt;&lt;/code&gt; type. * * Group: consumer (advanced) * * @param processStrategy the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder processStrategy( org.apache.camel.component.file.GenericFileProcessStrategy<org.apache.commons.net.ftp.FTPFile> processStrategy) { doSetProperty("processStrategy", processStrategy); return this; } /** * A pluggable * org.apache.camel.component.file.GenericFileProcessStrategy allowing * you to implement your own readLock option or similar. Can also be * used when special conditions must be met before a file can be * consumed, such as a special ready file exists. If this option is set * then the readLock option does not apply. * * The option will be converted to a * &lt;code&gt;org.apache.camel.component.file.GenericFileProcessStrategy&amp;lt;org.apache.commons.net.ftp.FTPFile&amp;gt;&lt;/code&gt; type. * * Group: consumer (advanced) * * @param processStrategy the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder processStrategy( String processStrategy) { doSetProperty("processStrategy", processStrategy); return this; } /** * Whether to allow using LIST command when downloading a file. Default * is true. In some use cases you may want to download a specific file * and are not allowed to use the LIST command, and therefore you can * set this option to false. Notice when using this option, then the * specific file to download does not include meta-data information such * as file size, timestamp, permissions etc, because those information * is only possible to retrieve when LIST command is in use. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: consumer (advanced) * * @param useList the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder useList(boolean useList) { doSetProperty("useList", useList); return this; } /** * Whether to allow using LIST command when downloading a file. Default * is true. In some use cases you may want to download a specific file * and are not allowed to use the LIST command, and therefore you can * set this option to false. Notice when using this option, then the * specific file to download does not include meta-data information such * as file size, timestamp, permissions etc, because those information * is only possible to retrieve when LIST command is in use. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: consumer (advanced) * * @param useList the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder useList(String useList) { doSetProperty("useList", useList); return this; } /** * Set the client side port range in active mode. The syntax is: * minPort-maxPort Both port numbers are inclusive, eg 10000-19999 to * include all 1xxxx ports. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: advanced * * @param activePortRange the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder activePortRange( String activePortRange) { doSetProperty("activePortRange", activePortRange); return this; } /** * Automatically create missing directories in the file's pathname. For * the file consumer, that means creating the starting directory. For * the file producer, it means the directory the files should be written * to. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: advanced * * @param autoCreate the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder autoCreate(boolean autoCreate) { doSetProperty("autoCreate", autoCreate); return this; } /** * Automatically create missing directories in the file's pathname. For * the file consumer, that means creating the starting directory. For * the file producer, it means the directory the files should be written * to. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: advanced * * @param autoCreate the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder autoCreate(String autoCreate) { doSetProperty("autoCreate", autoCreate); return this; } /** * Buffer size in bytes used for writing files (or in case of FTP for * downloading and uploading files). * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 131072 * Group: advanced * * @param bufferSize the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder bufferSize(int bufferSize) { doSetProperty("bufferSize", bufferSize); return this; } /** * Buffer size in bytes used for writing files (or in case of FTP for * downloading and uploading files). * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 131072 * Group: advanced * * @param bufferSize the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder bufferSize(String bufferSize) { doSetProperty("bufferSize", bufferSize); return this; } /** * Sets the connect timeout for waiting for a connection to be * established Used by both FTPClient and JSCH. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 10000 * Group: advanced * * @param connectTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder connectTimeout( int connectTimeout) { doSetProperty("connectTimeout", connectTimeout); return this; } /** * Sets the connect timeout for waiting for a connection to be * established Used by both FTPClient and JSCH. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 10000 * Group: advanced * * @param connectTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder connectTimeout( String connectTimeout) { doSetProperty("connectTimeout", connectTimeout); return this; } /** * To use a custom instance of FTPClient. * * The option is a: * &lt;code&gt;org.apache.commons.net.ftp.FTPClient&lt;/code&gt; type. * * Group: advanced * * @param ftpClient the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder ftpClient( org.apache.commons.net.ftp.FTPClient ftpClient) { doSetProperty("ftpClient", ftpClient); return this; } /** * To use a custom instance of FTPClient. * * The option will be converted to a * &lt;code&gt;org.apache.commons.net.ftp.FTPClient&lt;/code&gt; type. * * Group: advanced * * @param ftpClient the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder ftpClient(String ftpClient) { doSetProperty("ftpClient", ftpClient); return this; } /** * To use a custom instance of FTPClientConfig to configure the FTP * client the endpoint should use. * * The option is a: * &lt;code&gt;org.apache.commons.net.ftp.FTPClientConfig&lt;/code&gt; * type. * * Group: advanced * * @param ftpClientConfig the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder ftpClientConfig( org.apache.commons.net.ftp.FTPClientConfig ftpClientConfig) { doSetProperty("ftpClientConfig", ftpClientConfig); return this; } /** * To use a custom instance of FTPClientConfig to configure the FTP * client the endpoint should use. * * The option will be converted to a * &lt;code&gt;org.apache.commons.net.ftp.FTPClientConfig&lt;/code&gt; * type. * * Group: advanced * * @param ftpClientConfig the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder ftpClientConfig( String ftpClientConfig) { doSetProperty("ftpClientConfig", ftpClientConfig); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClientConfig. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientConfigParameters(String, Object) method to add a value (call * the method multiple times to set more values). * * Group: advanced * * @param key the option key * @param value the option value * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder ftpClientConfigParameters( String key, Object value) { doSetMultiValueProperty("ftpClientConfigParameters", "ftpClientConfig." + key, value); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClientConfig. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientConfigParameters(String, Object) method to add a value (call * the method multiple times to set more values). * * Group: advanced * * @param values the values * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder ftpClientConfigParameters( Map values) { doSetMultiValueProperties("ftpClientConfigParameters", "ftpClientConfig.", values); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClient. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientParameters(String, Object) method to add a value (call the * method multiple times to set more values). * * Group: advanced * * @param key the option key * @param value the option value * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder ftpClientParameters( String key, Object value) { doSetMultiValueProperty("ftpClientParameters", "ftpClient." + key, value); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClient. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientParameters(String, Object) method to add a value (call the * method multiple times to set more values). * * Group: advanced * * @param values the values * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder ftpClientParameters( Map values) { doSetMultiValueProperties("ftpClientParameters", "ftpClient.", values); return this; } /** * Specifies the maximum reconnect attempts Camel performs when it tries * to connect to the remote FTP server. Use 0 to disable this behavior. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Group: advanced * * @param maximumReconnectAttempts the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder maximumReconnectAttempts( int maximumReconnectAttempts) { doSetProperty("maximumReconnectAttempts", maximumReconnectAttempts); return this; } /** * Specifies the maximum reconnect attempts Camel performs when it tries * to connect to the remote FTP server. Use 0 to disable this behavior. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Group: advanced * * @param maximumReconnectAttempts the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder maximumReconnectAttempts( String maximumReconnectAttempts) { doSetProperty("maximumReconnectAttempts", maximumReconnectAttempts); return this; } /** * Delay in millis Camel will wait before performing a reconnect * attempt. * * The option is a: &lt;code&gt;long&lt;/code&gt; type. * * Default: 1000 * Group: advanced * * @param reconnectDelay the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder reconnectDelay( long reconnectDelay) { doSetProperty("reconnectDelay", reconnectDelay); return this; } /** * Delay in millis Camel will wait before performing a reconnect * attempt. * * The option will be converted to a &lt;code&gt;long&lt;/code&gt; type. * * Default: 1000 * Group: advanced * * @param reconnectDelay the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder reconnectDelay( String reconnectDelay) { doSetProperty("reconnectDelay", reconnectDelay); return this; } /** * Sets optional site command(s) to be executed after successful login. * Multiple site commands can be separated using a new line character. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: advanced * * @param siteCommand the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder siteCommand( String siteCommand) { doSetProperty("siteCommand", siteCommand); return this; } /** * Sets the so timeout FTP and FTPS Is the SocketOptions.SO_TIMEOUT * value in millis. Recommended option is to set this to 300000 so as * not have a hanged connection. On SFTP this option is set as timeout * on the JSCH Session instance. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 300000 * Group: advanced * * @param soTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder soTimeout(int soTimeout) { doSetProperty("soTimeout", soTimeout); return this; } /** * Sets the so timeout FTP and FTPS Is the SocketOptions.SO_TIMEOUT * value in millis. Recommended option is to set this to 300000 so as * not have a hanged connection. On SFTP this option is set as timeout * on the JSCH Session instance. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 300000 * Group: advanced * * @param soTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder soTimeout(String soTimeout) { doSetProperty("soTimeout", soTimeout); return this; } /** * Sets whether we should stepwise change directories while traversing * file structures when downloading files, or as well when uploading a * file to a directory. You can disable this if you for example are in a * situation where you cannot change directory on the FTP server due * security reasons. Stepwise cannot be used together with * streamDownload. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: advanced * * @param stepwise the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder stepwise(boolean stepwise) { doSetProperty("stepwise", stepwise); return this; } /** * Sets whether we should stepwise change directories while traversing * file structures when downloading files, or as well when uploading a * file to a directory. You can disable this if you for example are in a * situation where you cannot change directory on the FTP server due * security reasons. Stepwise cannot be used together with * streamDownload. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: advanced * * @param stepwise the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder stepwise(String stepwise) { doSetProperty("stepwise", stepwise); return this; } /** * Should an exception be thrown if connection failed (exhausted)By * default exception is not thrown and a WARN is logged. You can use * this to enable exception being thrown and handle the thrown exception * from the org.apache.camel.spi.PollingConsumerPollStrategy rollback * method. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: advanced * * @param throwExceptionOnConnectFailed the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder throwExceptionOnConnectFailed( boolean throwExceptionOnConnectFailed) { doSetProperty("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed); return this; } /** * Should an exception be thrown if connection failed (exhausted)By * default exception is not thrown and a WARN is logged. You can use * this to enable exception being thrown and handle the thrown exception * from the org.apache.camel.spi.PollingConsumerPollStrategy rollback * method. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: advanced * * @param throwExceptionOnConnectFailed the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder throwExceptionOnConnectFailed( String throwExceptionOnConnectFailed) { doSetProperty("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed); return this; } /** * Sets the data timeout for waiting for reply Used only by FTPClient. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 30000 * Group: advanced * * @param timeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder timeout(int timeout) { doSetProperty("timeout", timeout); return this; } /** * Sets the data timeout for waiting for reply Used only by FTPClient. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 30000 * Group: advanced * * @param timeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointConsumerBuilder timeout(String timeout) { doSetProperty("timeout", timeout); return this; } } /** * Builder for endpoint producers for the FTP component. */ public interface FtpEndpointProducerBuilder extends EndpointProducerBuilder { default AdvancedFtpEndpointProducerBuilder advanced() { return (AdvancedFtpEndpointProducerBuilder) this; } /** * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII * (false). * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param binary the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder binary(boolean binary) { doSetProperty("binary", binary); return this; } /** * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII * (false). * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param binary the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder binary(String binary) { doSetProperty("binary", binary); return this; } /** * This option is used to specify the encoding of the file. You can use * this on the consumer, to specify the encodings of the files, which * allow Camel to know the charset it should load the file content in * case the file content is being accessed. Likewise when writing a * file, you can use this option to specify which charset to write the * file as well. Do mind that when writing the file Camel may have to * read the message content into memory to be able to convert the data * into the configured charset, so do not use this if you have big * messages. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: common * * @param charset the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder charset(String charset) { doSetProperty("charset", charset); return this; } /** * Whether or not to disconnect from remote FTP server right after use. * Disconnect will only disconnect the current connection to the FTP * server. If you have a consumer which you want to stop, then you need * to stop the consumer/route instead. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param disconnect the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder disconnect(boolean disconnect) { doSetProperty("disconnect", disconnect); return this; } /** * Whether or not to disconnect from remote FTP server right after use. * Disconnect will only disconnect the current connection to the FTP * server. If you have a consumer which you want to stop, then you need * to stop the consumer/route instead. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param disconnect the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder disconnect(String disconnect) { doSetProperty("disconnect", disconnect); return this; } /** * Producer: If provided, then Camel will write a 2nd done file when the * original file has been written. The done file will be empty. This * option configures what file name to use. Either you can specify a * fixed name. Or you can use dynamic placeholders. The done file will * always be written in the same folder as the original file. Consumer: * If provided, Camel will only consume files if a done file exists. * This option configures what file name to use. Either you can specify * a fixed name. Or you can use dynamic placeholders.The done file is * always expected in the same folder as the original file. Only * ${file.name} and ${file.name.next} is supported as dynamic * placeholders. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: common * * @param doneFileName the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder doneFileName(String doneFileName) { doSetProperty("doneFileName", doneFileName); return this; } /** * Use Expression such as File Language to dynamically set the filename. * For consumers, it's used as a filename filter. For producers, it's * used to evaluate the filename to write. If an expression is set, it * take precedence over the CamelFileName header. (Note: The header * itself can also be an Expression). The expression options support * both String and Expression types. If the expression is a String type, * it is always evaluated using the File Language. If the expression is * an Expression type, the specified Expression type is used - this * allows you, for instance, to use OGNL expressions. For the consumer, * you can use it to filter filenames, so you can for instance consume * today's file using the File Language syntax: * mydata-${date:now:yyyyMMdd}.txt. The producers support the * CamelOverruleFileName header which takes precedence over any existing * CamelFileName header; the CamelOverruleFileName is a header that is * used only once, and makes it easier as this avoids to temporary store * CamelFileName and have to restore it afterwards. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: common * * @param fileName the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder fileName(String fileName) { doSetProperty("fileName", fileName); return this; } /** * Sets passive mode connections. Default is active mode connections. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param passiveMode the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder passiveMode(boolean passiveMode) { doSetProperty("passiveMode", passiveMode); return this; } /** * Sets passive mode connections. Default is active mode connections. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param passiveMode the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder passiveMode(String passiveMode) { doSetProperty("passiveMode", passiveMode); return this; } /** * Sets the path separator to be used. UNIX = Uses unix style path * separator Windows = Uses windows style path separator Auto = (is * default) Use existing path separator in file name. * * The option is a: * &lt;code&gt;org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator&lt;/code&gt; type. * * Default: UNIX * Group: common * * @param separator the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder separator( org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator separator) { doSetProperty("separator", separator); return this; } /** * Sets the path separator to be used. UNIX = Uses unix style path * separator Windows = Uses windows style path separator Auto = (is * default) Use existing path separator in file name. * * The option will be converted to a * &lt;code&gt;org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator&lt;/code&gt; type. * * Default: UNIX * Group: common * * @param separator the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder separator(String separator) { doSetProperty("separator", separator); return this; } /** * Configures the interval in seconds to use when logging the progress * of upload and download operations that are in-flight. This is used * for logging progress when operations takes longer time. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 5 * Group: common * * @param transferLoggingIntervalSeconds the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder transferLoggingIntervalSeconds( int transferLoggingIntervalSeconds) { doSetProperty("transferLoggingIntervalSeconds", transferLoggingIntervalSeconds); return this; } /** * Configures the interval in seconds to use when logging the progress * of upload and download operations that are in-flight. This is used * for logging progress when operations takes longer time. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 5 * Group: common * * @param transferLoggingIntervalSeconds the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder transferLoggingIntervalSeconds( String transferLoggingIntervalSeconds) { doSetProperty("transferLoggingIntervalSeconds", transferLoggingIntervalSeconds); return this; } /** * Configure the logging level to use when logging the progress of * upload and download operations. * * The option is a: * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: DEBUG * Group: common * * @param transferLoggingLevel the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder transferLoggingLevel( org.apache.camel.LoggingLevel transferLoggingLevel) { doSetProperty("transferLoggingLevel", transferLoggingLevel); return this; } /** * Configure the logging level to use when logging the progress of * upload and download operations. * * The option will be converted to a * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: DEBUG * Group: common * * @param transferLoggingLevel the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder transferLoggingLevel( String transferLoggingLevel) { doSetProperty("transferLoggingLevel", transferLoggingLevel); return this; } /** * Configures whether the perform verbose (fine grained) logging of the * progress of upload and download operations. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param transferLoggingVerbose the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder transferLoggingVerbose( boolean transferLoggingVerbose) { doSetProperty("transferLoggingVerbose", transferLoggingVerbose); return this; } /** * Configures whether the perform verbose (fine grained) logging of the * progress of upload and download operations. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param transferLoggingVerbose the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder transferLoggingVerbose( String transferLoggingVerbose) { doSetProperty("transferLoggingVerbose", transferLoggingVerbose); return this; } /** * What to do if a file already exists with the same name. Override, * which is the default, replaces the existing file. - Append - adds * content to the existing file. - Fail - throws a * GenericFileOperationException, indicating that there is already an * existing file. - Ignore - silently ignores the problem and does not * override the existing file, but assumes everything is okay. - Move - * option requires to use the moveExisting option to be configured as * well. The option eagerDeleteTargetFile can be used to control what to * do if an moving the file, and there exists already an existing file, * otherwise causing the move operation to fail. The Move option will * move any existing files, before writing the target file. - TryRename * is only applicable if tempFileName option is in use. This allows to * try renaming the file from the temporary name to the actual name, * without doing any exists check. This check may be faster on some file * systems and especially FTP servers. * * The option is a: * &lt;code&gt;org.apache.camel.component.file.GenericFileExist&lt;/code&gt; type. * * Default: Override * Group: producer * * @param fileExist the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder fileExist( org.apache.camel.component.file.GenericFileExist fileExist) { doSetProperty("fileExist", fileExist); return this; } /** * What to do if a file already exists with the same name. Override, * which is the default, replaces the existing file. - Append - adds * content to the existing file. - Fail - throws a * GenericFileOperationException, indicating that there is already an * existing file. - Ignore - silently ignores the problem and does not * override the existing file, but assumes everything is okay. - Move - * option requires to use the moveExisting option to be configured as * well. The option eagerDeleteTargetFile can be used to control what to * do if an moving the file, and there exists already an existing file, * otherwise causing the move operation to fail. The Move option will * move any existing files, before writing the target file. - TryRename * is only applicable if tempFileName option is in use. This allows to * try renaming the file from the temporary name to the actual name, * without doing any exists check. This check may be faster on some file * systems and especially FTP servers. * * The option will be converted to a * &lt;code&gt;org.apache.camel.component.file.GenericFileExist&lt;/code&gt; type. * * Default: Override * Group: producer * * @param fileExist the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder fileExist(String fileExist) { doSetProperty("fileExist", fileExist); return this; } /** * Flatten is used to flatten the file name path to strip any leading * paths, so it's just the file name. This allows you to consume * recursively into sub-directories, but when you eg write the files to * another directory they will be written in a single directory. Setting * this to true on the producer enforces that any file name in * CamelFileName header will be stripped for any leading paths. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: producer * * @param flatten the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder flatten(boolean flatten) { doSetProperty("flatten", flatten); return this; } /** * Flatten is used to flatten the file name path to strip any leading * paths, so it's just the file name. This allows you to consume * recursively into sub-directories, but when you eg write the files to * another directory they will be written in a single directory. Setting * this to true on the producer enforces that any file name in * CamelFileName header will be stripped for any leading paths. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: producer * * @param flatten the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder flatten(String flatten) { doSetProperty("flatten", flatten); return this; } /** * Used for jailing (restricting) writing files to the starting * directory (and sub) only. This is enabled by default to not allow * Camel to write files to outside directories (to be more secured out * of the box). You can turn this off to allow writing files to * directories outside the starting directory, such as parent or root * folders. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: producer * * @param jailStartingDirectory the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder jailStartingDirectory( boolean jailStartingDirectory) { doSetProperty("jailStartingDirectory", jailStartingDirectory); return this; } /** * Used for jailing (restricting) writing files to the starting * directory (and sub) only. This is enabled by default to not allow * Camel to write files to outside directories (to be more secured out * of the box). You can turn this off to allow writing files to * directories outside the starting directory, such as parent or root * folders. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: producer * * @param jailStartingDirectory the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder jailStartingDirectory( String jailStartingDirectory) { doSetProperty("jailStartingDirectory", jailStartingDirectory); return this; } /** * Expression (such as File Language) used to compute file name to use * when fileExist=Move is configured. To move files into a backup * subdirectory just enter backup. This option only supports the * following File Language tokens: file:name, file:name.ext, * file:name.noext, file:onlyname, file:onlyname.noext, file:ext, and * file:parent. Notice the file:parent is not supported by the FTP * component, as the FTP component can only move any existing files to a * relative directory based on current dir as base. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: producer * * @param moveExisting the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder moveExisting(String moveExisting) { doSetProperty("moveExisting", moveExisting); return this; } /** * The same as tempPrefix option but offering a more fine grained * control on the naming of the temporary filename as it uses the File * Language. The location for tempFilename is relative to the final file * location in the option 'fileName', not the target directory in the * base uri. For example if option fileName includes a directory prefix: * dir/finalFilename then tempFileName is relative to that subdirectory * dir. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: producer * * @param tempFileName the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder tempFileName(String tempFileName) { doSetProperty("tempFileName", tempFileName); return this; } /** * This option is used to write the file using a temporary name and * then, after the write is complete, rename it to the real name. Can be * used to identify files being written and also avoid consumers (not * using exclusive read locks) reading in progress files. Is often used * by FTP when uploading big files. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: producer * * @param tempPrefix the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder tempPrefix(String tempPrefix) { doSetProperty("tempPrefix", tempPrefix); return this; } /** * Account to use for login. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: security * * @param account the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder account(String account) { doSetProperty("account", account); return this; } /** * Password to use for login. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: security * * @param password the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder password(String password) { doSetProperty("password", password); return this; } /** * Username to use for login. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: security * * @param username the value to set * @return the dsl builder */ default FtpEndpointProducerBuilder username(String username) { doSetProperty("username", username); return this; } } /** * Advanced builder for endpoint producers for the FTP component. */ public interface AdvancedFtpEndpointProducerBuilder extends EndpointProducerBuilder { default FtpEndpointProducerBuilder basic() { return (FtpEndpointProducerBuilder) this; } /** * If set this option to be true, camel-ftp will use the list file * directly to check if the file exists. Since some FTP server may not * support to list the file directly, if the option is false, camel-ftp * will use the old way to list the directory and check if the file * exists. This option also influences readLock=changed to control * whether it performs a fast check to update file information or not. * This can be used to speed up the process if the FTP server has a lot * of files. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common (advanced) * * @param fastExistsCheck the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder fastExistsCheck( boolean fastExistsCheck) { doSetProperty("fastExistsCheck", fastExistsCheck); return this; } /** * If set this option to be true, camel-ftp will use the list file * directly to check if the file exists. Since some FTP server may not * support to list the file directly, if the option is false, camel-ftp * will use the old way to list the directory and check if the file * exists. This option also influences readLock=changed to control * whether it performs a fast check to update file information or not. * This can be used to speed up the process if the FTP server has a lot * of files. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common (advanced) * * @param fastExistsCheck the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder fastExistsCheck( String fastExistsCheck) { doSetProperty("fastExistsCheck", fastExistsCheck); return this; } /** * Used to specify if a null body is allowed during file writing. If set * to true then an empty file will be created, when set to false, and * attempting to send a null body to the file component, a * GenericFileWriteException of 'Cannot write null body to file.' will * be thrown. If the fileExist option is set to 'Override', then the * file will be truncated, and if set to append the file will remain * unchanged. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: producer (advanced) * * @param allowNullBody the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder allowNullBody( boolean allowNullBody) { doSetProperty("allowNullBody", allowNullBody); return this; } /** * Used to specify if a null body is allowed during file writing. If set * to true then an empty file will be created, when set to false, and * attempting to send a null body to the file component, a * GenericFileWriteException of 'Cannot write null body to file.' will * be thrown. If the fileExist option is set to 'Override', then the * file will be truncated, and if set to append the file will remain * unchanged. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: producer (advanced) * * @param allowNullBody the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder allowNullBody( String allowNullBody) { doSetProperty("allowNullBody", allowNullBody); return this; } /** * Allows you to set chmod on the stored file. For example chmod=640. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: producer (advanced) * * @param chmod the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder chmod(String chmod) { doSetProperty("chmod", chmod); return this; } /** * Whether or not to disconnect from remote FTP server right after a * Batch upload is complete. disconnectOnBatchComplete will only * disconnect the current connection to the FTP server. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: producer (advanced) * * @param disconnectOnBatchComplete the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder disconnectOnBatchComplete( boolean disconnectOnBatchComplete) { doSetProperty("disconnectOnBatchComplete", disconnectOnBatchComplete); return this; } /** * Whether or not to disconnect from remote FTP server right after a * Batch upload is complete. disconnectOnBatchComplete will only * disconnect the current connection to the FTP server. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: producer (advanced) * * @param disconnectOnBatchComplete the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder disconnectOnBatchComplete( String disconnectOnBatchComplete) { doSetProperty("disconnectOnBatchComplete", disconnectOnBatchComplete); return this; } /** * Whether or not to eagerly delete any existing target file. This * option only applies when you use fileExists=Override and the * tempFileName option as well. You can use this to disable (set it to * false) deleting the target file before the temp file is written. For * example you may write big files and want the target file to exists * during the temp file is being written. This ensure the target file is * only deleted until the very last moment, just before the temp file is * being renamed to the target filename. This option is also used to * control whether to delete any existing files when fileExist=Move is * enabled, and an existing file exists. If this option * copyAndDeleteOnRenameFails false, then an exception will be thrown if * an existing file existed, if its true, then the existing file is * deleted before the move operation. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: producer (advanced) * * @param eagerDeleteTargetFile the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder eagerDeleteTargetFile( boolean eagerDeleteTargetFile) { doSetProperty("eagerDeleteTargetFile", eagerDeleteTargetFile); return this; } /** * Whether or not to eagerly delete any existing target file. This * option only applies when you use fileExists=Override and the * tempFileName option as well. You can use this to disable (set it to * false) deleting the target file before the temp file is written. For * example you may write big files and want the target file to exists * during the temp file is being written. This ensure the target file is * only deleted until the very last moment, just before the temp file is * being renamed to the target filename. This option is also used to * control whether to delete any existing files when fileExist=Move is * enabled, and an existing file exists. If this option * copyAndDeleteOnRenameFails false, then an exception will be thrown if * an existing file existed, if its true, then the existing file is * deleted before the move operation. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: producer (advanced) * * @param eagerDeleteTargetFile the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder eagerDeleteTargetFile( String eagerDeleteTargetFile) { doSetProperty("eagerDeleteTargetFile", eagerDeleteTargetFile); return this; } /** * Will keep the last modified timestamp from the source file (if any). * Will use the FileConstants.FILE_LAST_MODIFIED header to located the * timestamp. This header can contain either a java.util.Date or long * with the timestamp. If the timestamp exists and the option is enabled * it will set this timestamp on the written file. Note: This option * only applies to the file producer. You cannot use this option with * any of the ftp producers. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: producer (advanced) * * @param keepLastModified the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder keepLastModified( boolean keepLastModified) { doSetProperty("keepLastModified", keepLastModified); return this; } /** * Will keep the last modified timestamp from the source file (if any). * Will use the FileConstants.FILE_LAST_MODIFIED header to located the * timestamp. This header can contain either a java.util.Date or long * with the timestamp. If the timestamp exists and the option is enabled * it will set this timestamp on the written file. Note: This option * only applies to the file producer. You cannot use this option with * any of the ftp producers. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: producer (advanced) * * @param keepLastModified the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder keepLastModified( String keepLastModified) { doSetProperty("keepLastModified", keepLastModified); return this; } /** * Whether the producer should be started lazy (on the first message). * By starting lazy you can use this to allow CamelContext and routes to * startup in situations where a producer may otherwise fail during * starting and cause the route to fail being started. By deferring this * startup to be lazy then the startup failure can be handled during * routing messages via Camel's routing error handlers. Beware that when * the first message is processed then creating and starting the * producer may take a little time and prolong the total processing time * of the processing. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: producer (advanced) * * @param lazyStartProducer the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder lazyStartProducer( boolean lazyStartProducer) { doSetProperty("lazyStartProducer", lazyStartProducer); return this; } /** * Whether the producer should be started lazy (on the first message). * By starting lazy you can use this to allow CamelContext and routes to * startup in situations where a producer may otherwise fail during * starting and cause the route to fail being started. By deferring this * startup to be lazy then the startup failure can be handled during * routing messages via Camel's routing error handlers. Beware that when * the first message is processed then creating and starting the * producer may take a little time and prolong the total processing time * of the processing. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: producer (advanced) * * @param lazyStartProducer the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder lazyStartProducer( String lazyStartProducer) { doSetProperty("lazyStartProducer", lazyStartProducer); return this; } /** * Strategy (Custom Strategy) used to move file with special naming * token to use when fileExist=Move is configured. By default, there is * an implementation used if no custom strategy is provided. * * The option is a: * &lt;code&gt;org.apache.camel.component.file.strategy.FileMoveExistingStrategy&lt;/code&gt; type. * * Group: producer (advanced) * * @param moveExistingFileStrategy the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder moveExistingFileStrategy( org.apache.camel.component.file.strategy.FileMoveExistingStrategy moveExistingFileStrategy) { doSetProperty("moveExistingFileStrategy", moveExistingFileStrategy); return this; } /** * Strategy (Custom Strategy) used to move file with special naming * token to use when fileExist=Move is configured. By default, there is * an implementation used if no custom strategy is provided. * * The option will be converted to a * &lt;code&gt;org.apache.camel.component.file.strategy.FileMoveExistingStrategy&lt;/code&gt; type. * * Group: producer (advanced) * * @param moveExistingFileStrategy the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder moveExistingFileStrategy( String moveExistingFileStrategy) { doSetProperty("moveExistingFileStrategy", moveExistingFileStrategy); return this; } /** * Whether to send a noop command as a pre-write check before uploading * files to the FTP server. This is enabled by default as a validation * of the connection is still valid, which allows to silently re-connect * to be able to upload the file. However if this causes problems, you * can turn this option off. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: producer (advanced) * * @param sendNoop the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder sendNoop(boolean sendNoop) { doSetProperty("sendNoop", sendNoop); return this; } /** * Whether to send a noop command as a pre-write check before uploading * files to the FTP server. This is enabled by default as a validation * of the connection is still valid, which allows to silently re-connect * to be able to upload the file. However if this causes problems, you * can turn this option off. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: producer (advanced) * * @param sendNoop the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder sendNoop(String sendNoop) { doSetProperty("sendNoop", sendNoop); return this; } /** * Set the client side port range in active mode. The syntax is: * minPort-maxPort Both port numbers are inclusive, eg 10000-19999 to * include all 1xxxx ports. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: advanced * * @param activePortRange the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder activePortRange( String activePortRange) { doSetProperty("activePortRange", activePortRange); return this; } /** * Automatically create missing directories in the file's pathname. For * the file consumer, that means creating the starting directory. For * the file producer, it means the directory the files should be written * to. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: advanced * * @param autoCreate the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder autoCreate(boolean autoCreate) { doSetProperty("autoCreate", autoCreate); return this; } /** * Automatically create missing directories in the file's pathname. For * the file consumer, that means creating the starting directory. For * the file producer, it means the directory the files should be written * to. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: advanced * * @param autoCreate the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder autoCreate(String autoCreate) { doSetProperty("autoCreate", autoCreate); return this; } /** * Buffer size in bytes used for writing files (or in case of FTP for * downloading and uploading files). * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 131072 * Group: advanced * * @param bufferSize the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder bufferSize(int bufferSize) { doSetProperty("bufferSize", bufferSize); return this; } /** * Buffer size in bytes used for writing files (or in case of FTP for * downloading and uploading files). * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 131072 * Group: advanced * * @param bufferSize the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder bufferSize(String bufferSize) { doSetProperty("bufferSize", bufferSize); return this; } /** * Sets the connect timeout for waiting for a connection to be * established Used by both FTPClient and JSCH. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 10000 * Group: advanced * * @param connectTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder connectTimeout( int connectTimeout) { doSetProperty("connectTimeout", connectTimeout); return this; } /** * Sets the connect timeout for waiting for a connection to be * established Used by both FTPClient and JSCH. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 10000 * Group: advanced * * @param connectTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder connectTimeout( String connectTimeout) { doSetProperty("connectTimeout", connectTimeout); return this; } /** * To use a custom instance of FTPClient. * * The option is a: * &lt;code&gt;org.apache.commons.net.ftp.FTPClient&lt;/code&gt; type. * * Group: advanced * * @param ftpClient the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder ftpClient( org.apache.commons.net.ftp.FTPClient ftpClient) { doSetProperty("ftpClient", ftpClient); return this; } /** * To use a custom instance of FTPClient. * * The option will be converted to a * &lt;code&gt;org.apache.commons.net.ftp.FTPClient&lt;/code&gt; type. * * Group: advanced * * @param ftpClient the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder ftpClient(String ftpClient) { doSetProperty("ftpClient", ftpClient); return this; } /** * To use a custom instance of FTPClientConfig to configure the FTP * client the endpoint should use. * * The option is a: * &lt;code&gt;org.apache.commons.net.ftp.FTPClientConfig&lt;/code&gt; * type. * * Group: advanced * * @param ftpClientConfig the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder ftpClientConfig( org.apache.commons.net.ftp.FTPClientConfig ftpClientConfig) { doSetProperty("ftpClientConfig", ftpClientConfig); return this; } /** * To use a custom instance of FTPClientConfig to configure the FTP * client the endpoint should use. * * The option will be converted to a * &lt;code&gt;org.apache.commons.net.ftp.FTPClientConfig&lt;/code&gt; * type. * * Group: advanced * * @param ftpClientConfig the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder ftpClientConfig( String ftpClientConfig) { doSetProperty("ftpClientConfig", ftpClientConfig); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClientConfig. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientConfigParameters(String, Object) method to add a value (call * the method multiple times to set more values). * * Group: advanced * * @param key the option key * @param value the option value * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder ftpClientConfigParameters( String key, Object value) { doSetMultiValueProperty("ftpClientConfigParameters", "ftpClientConfig." + key, value); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClientConfig. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientConfigParameters(String, Object) method to add a value (call * the method multiple times to set more values). * * Group: advanced * * @param values the values * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder ftpClientConfigParameters( Map values) { doSetMultiValueProperties("ftpClientConfigParameters", "ftpClientConfig.", values); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClient. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientParameters(String, Object) method to add a value (call the * method multiple times to set more values). * * Group: advanced * * @param key the option key * @param value the option value * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder ftpClientParameters( String key, Object value) { doSetMultiValueProperty("ftpClientParameters", "ftpClient." + key, value); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClient. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientParameters(String, Object) method to add a value (call the * method multiple times to set more values). * * Group: advanced * * @param values the values * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder ftpClientParameters( Map values) { doSetMultiValueProperties("ftpClientParameters", "ftpClient.", values); return this; } /** * Specifies the maximum reconnect attempts Camel performs when it tries * to connect to the remote FTP server. Use 0 to disable this behavior. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Group: advanced * * @param maximumReconnectAttempts the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder maximumReconnectAttempts( int maximumReconnectAttempts) { doSetProperty("maximumReconnectAttempts", maximumReconnectAttempts); return this; } /** * Specifies the maximum reconnect attempts Camel performs when it tries * to connect to the remote FTP server. Use 0 to disable this behavior. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Group: advanced * * @param maximumReconnectAttempts the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder maximumReconnectAttempts( String maximumReconnectAttempts) { doSetProperty("maximumReconnectAttempts", maximumReconnectAttempts); return this; } /** * Delay in millis Camel will wait before performing a reconnect * attempt. * * The option is a: &lt;code&gt;long&lt;/code&gt; type. * * Default: 1000 * Group: advanced * * @param reconnectDelay the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder reconnectDelay( long reconnectDelay) { doSetProperty("reconnectDelay", reconnectDelay); return this; } /** * Delay in millis Camel will wait before performing a reconnect * attempt. * * The option will be converted to a &lt;code&gt;long&lt;/code&gt; type. * * Default: 1000 * Group: advanced * * @param reconnectDelay the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder reconnectDelay( String reconnectDelay) { doSetProperty("reconnectDelay", reconnectDelay); return this; } /** * Sets optional site command(s) to be executed after successful login. * Multiple site commands can be separated using a new line character. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: advanced * * @param siteCommand the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder siteCommand( String siteCommand) { doSetProperty("siteCommand", siteCommand); return this; } /** * Sets the so timeout FTP and FTPS Is the SocketOptions.SO_TIMEOUT * value in millis. Recommended option is to set this to 300000 so as * not have a hanged connection. On SFTP this option is set as timeout * on the JSCH Session instance. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 300000 * Group: advanced * * @param soTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder soTimeout(int soTimeout) { doSetProperty("soTimeout", soTimeout); return this; } /** * Sets the so timeout FTP and FTPS Is the SocketOptions.SO_TIMEOUT * value in millis. Recommended option is to set this to 300000 so as * not have a hanged connection. On SFTP this option is set as timeout * on the JSCH Session instance. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 300000 * Group: advanced * * @param soTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder soTimeout(String soTimeout) { doSetProperty("soTimeout", soTimeout); return this; } /** * Sets whether we should stepwise change directories while traversing * file structures when downloading files, or as well when uploading a * file to a directory. You can disable this if you for example are in a * situation where you cannot change directory on the FTP server due * security reasons. Stepwise cannot be used together with * streamDownload. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: advanced * * @param stepwise the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder stepwise(boolean stepwise) { doSetProperty("stepwise", stepwise); return this; } /** * Sets whether we should stepwise change directories while traversing * file structures when downloading files, or as well when uploading a * file to a directory. You can disable this if you for example are in a * situation where you cannot change directory on the FTP server due * security reasons. Stepwise cannot be used together with * streamDownload. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: advanced * * @param stepwise the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder stepwise(String stepwise) { doSetProperty("stepwise", stepwise); return this; } /** * Should an exception be thrown if connection failed (exhausted)By * default exception is not thrown and a WARN is logged. You can use * this to enable exception being thrown and handle the thrown exception * from the org.apache.camel.spi.PollingConsumerPollStrategy rollback * method. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: advanced * * @param throwExceptionOnConnectFailed the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder throwExceptionOnConnectFailed( boolean throwExceptionOnConnectFailed) { doSetProperty("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed); return this; } /** * Should an exception be thrown if connection failed (exhausted)By * default exception is not thrown and a WARN is logged. You can use * this to enable exception being thrown and handle the thrown exception * from the org.apache.camel.spi.PollingConsumerPollStrategy rollback * method. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: advanced * * @param throwExceptionOnConnectFailed the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder throwExceptionOnConnectFailed( String throwExceptionOnConnectFailed) { doSetProperty("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed); return this; } /** * Sets the data timeout for waiting for reply Used only by FTPClient. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 30000 * Group: advanced * * @param timeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder timeout(int timeout) { doSetProperty("timeout", timeout); return this; } /** * Sets the data timeout for waiting for reply Used only by FTPClient. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 30000 * Group: advanced * * @param timeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointProducerBuilder timeout(String timeout) { doSetProperty("timeout", timeout); return this; } } /** * Builder for endpoint for the FTP component. */ public interface FtpEndpointBuilder extends FtpEndpointConsumerBuilder, FtpEndpointProducerBuilder { default AdvancedFtpEndpointBuilder advanced() { return (AdvancedFtpEndpointBuilder) this; } /** * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII * (false). * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param binary the value to set * @return the dsl builder */ default FtpEndpointBuilder binary(boolean binary) { doSetProperty("binary", binary); return this; } /** * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII * (false). * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param binary the value to set * @return the dsl builder */ default FtpEndpointBuilder binary(String binary) { doSetProperty("binary", binary); return this; } /** * This option is used to specify the encoding of the file. You can use * this on the consumer, to specify the encodings of the files, which * allow Camel to know the charset it should load the file content in * case the file content is being accessed. Likewise when writing a * file, you can use this option to specify which charset to write the * file as well. Do mind that when writing the file Camel may have to * read the message content into memory to be able to convert the data * into the configured charset, so do not use this if you have big * messages. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: common * * @param charset the value to set * @return the dsl builder */ default FtpEndpointBuilder charset(String charset) { doSetProperty("charset", charset); return this; } /** * Whether or not to disconnect from remote FTP server right after use. * Disconnect will only disconnect the current connection to the FTP * server. If you have a consumer which you want to stop, then you need * to stop the consumer/route instead. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param disconnect the value to set * @return the dsl builder */ default FtpEndpointBuilder disconnect(boolean disconnect) { doSetProperty("disconnect", disconnect); return this; } /** * Whether or not to disconnect from remote FTP server right after use. * Disconnect will only disconnect the current connection to the FTP * server. If you have a consumer which you want to stop, then you need * to stop the consumer/route instead. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param disconnect the value to set * @return the dsl builder */ default FtpEndpointBuilder disconnect(String disconnect) { doSetProperty("disconnect", disconnect); return this; } /** * Producer: If provided, then Camel will write a 2nd done file when the * original file has been written. The done file will be empty. This * option configures what file name to use. Either you can specify a * fixed name. Or you can use dynamic placeholders. The done file will * always be written in the same folder as the original file. Consumer: * If provided, Camel will only consume files if a done file exists. * This option configures what file name to use. Either you can specify * a fixed name. Or you can use dynamic placeholders.The done file is * always expected in the same folder as the original file. Only * ${file.name} and ${file.name.next} is supported as dynamic * placeholders. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: common * * @param doneFileName the value to set * @return the dsl builder */ default FtpEndpointBuilder doneFileName(String doneFileName) { doSetProperty("doneFileName", doneFileName); return this; } /** * Use Expression such as File Language to dynamically set the filename. * For consumers, it's used as a filename filter. For producers, it's * used to evaluate the filename to write. If an expression is set, it * take precedence over the CamelFileName header. (Note: The header * itself can also be an Expression). The expression options support * both String and Expression types. If the expression is a String type, * it is always evaluated using the File Language. If the expression is * an Expression type, the specified Expression type is used - this * allows you, for instance, to use OGNL expressions. For the consumer, * you can use it to filter filenames, so you can for instance consume * today's file using the File Language syntax: * mydata-${date:now:yyyyMMdd}.txt. The producers support the * CamelOverruleFileName header which takes precedence over any existing * CamelFileName header; the CamelOverruleFileName is a header that is * used only once, and makes it easier as this avoids to temporary store * CamelFileName and have to restore it afterwards. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: common * * @param fileName the value to set * @return the dsl builder */ default FtpEndpointBuilder fileName(String fileName) { doSetProperty("fileName", fileName); return this; } /** * Sets passive mode connections. Default is active mode connections. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param passiveMode the value to set * @return the dsl builder */ default FtpEndpointBuilder passiveMode(boolean passiveMode) { doSetProperty("passiveMode", passiveMode); return this; } /** * Sets passive mode connections. Default is active mode connections. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param passiveMode the value to set * @return the dsl builder */ default FtpEndpointBuilder passiveMode(String passiveMode) { doSetProperty("passiveMode", passiveMode); return this; } /** * Sets the path separator to be used. UNIX = Uses unix style path * separator Windows = Uses windows style path separator Auto = (is * default) Use existing path separator in file name. * * The option is a: * &lt;code&gt;org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator&lt;/code&gt; type. * * Default: UNIX * Group: common * * @param separator the value to set * @return the dsl builder */ default FtpEndpointBuilder separator( org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator separator) { doSetProperty("separator", separator); return this; } /** * Sets the path separator to be used. UNIX = Uses unix style path * separator Windows = Uses windows style path separator Auto = (is * default) Use existing path separator in file name. * * The option will be converted to a * &lt;code&gt;org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator&lt;/code&gt; type. * * Default: UNIX * Group: common * * @param separator the value to set * @return the dsl builder */ default FtpEndpointBuilder separator(String separator) { doSetProperty("separator", separator); return this; } /** * Configures the interval in seconds to use when logging the progress * of upload and download operations that are in-flight. This is used * for logging progress when operations takes longer time. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 5 * Group: common * * @param transferLoggingIntervalSeconds the value to set * @return the dsl builder */ default FtpEndpointBuilder transferLoggingIntervalSeconds( int transferLoggingIntervalSeconds) { doSetProperty("transferLoggingIntervalSeconds", transferLoggingIntervalSeconds); return this; } /** * Configures the interval in seconds to use when logging the progress * of upload and download operations that are in-flight. This is used * for logging progress when operations takes longer time. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 5 * Group: common * * @param transferLoggingIntervalSeconds the value to set * @return the dsl builder */ default FtpEndpointBuilder transferLoggingIntervalSeconds( String transferLoggingIntervalSeconds) { doSetProperty("transferLoggingIntervalSeconds", transferLoggingIntervalSeconds); return this; } /** * Configure the logging level to use when logging the progress of * upload and download operations. * * The option is a: * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: DEBUG * Group: common * * @param transferLoggingLevel the value to set * @return the dsl builder */ default FtpEndpointBuilder transferLoggingLevel( org.apache.camel.LoggingLevel transferLoggingLevel) { doSetProperty("transferLoggingLevel", transferLoggingLevel); return this; } /** * Configure the logging level to use when logging the progress of * upload and download operations. * * The option will be converted to a * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: DEBUG * Group: common * * @param transferLoggingLevel the value to set * @return the dsl builder */ default FtpEndpointBuilder transferLoggingLevel( String transferLoggingLevel) { doSetProperty("transferLoggingLevel", transferLoggingLevel); return this; } /** * Configures whether the perform verbose (fine grained) logging of the * progress of upload and download operations. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common * * @param transferLoggingVerbose the value to set * @return the dsl builder */ default FtpEndpointBuilder transferLoggingVerbose( boolean transferLoggingVerbose) { doSetProperty("transferLoggingVerbose", transferLoggingVerbose); return this; } /** * Configures whether the perform verbose (fine grained) logging of the * progress of upload and download operations. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common * * @param transferLoggingVerbose the value to set * @return the dsl builder */ default FtpEndpointBuilder transferLoggingVerbose( String transferLoggingVerbose) { doSetProperty("transferLoggingVerbose", transferLoggingVerbose); return this; } /** * Account to use for login. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: security * * @param account the value to set * @return the dsl builder */ default FtpEndpointBuilder account(String account) { doSetProperty("account", account); return this; } /** * Password to use for login. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: security * * @param password the value to set * @return the dsl builder */ default FtpEndpointBuilder password(String password) { doSetProperty("password", password); return this; } /** * Username to use for login. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: security * * @param username the value to set * @return the dsl builder */ default FtpEndpointBuilder username(String username) { doSetProperty("username", username); return this; } } /** * Advanced builder for endpoint for the FTP component. */ public interface AdvancedFtpEndpointBuilder extends AdvancedFtpEndpointConsumerBuilder, AdvancedFtpEndpointProducerBuilder { default FtpEndpointBuilder basic() { return (FtpEndpointBuilder) this; } /** * If set this option to be true, camel-ftp will use the list file * directly to check if the file exists. Since some FTP server may not * support to list the file directly, if the option is false, camel-ftp * will use the old way to list the directory and check if the file * exists. This option also influences readLock=changed to control * whether it performs a fast check to update file information or not. * This can be used to speed up the process if the FTP server has a lot * of files. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: common (advanced) * * @param fastExistsCheck the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder fastExistsCheck( boolean fastExistsCheck) { doSetProperty("fastExistsCheck", fastExistsCheck); return this; } /** * If set this option to be true, camel-ftp will use the list file * directly to check if the file exists. Since some FTP server may not * support to list the file directly, if the option is false, camel-ftp * will use the old way to list the directory and check if the file * exists. This option also influences readLock=changed to control * whether it performs a fast check to update file information or not. * This can be used to speed up the process if the FTP server has a lot * of files. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: common (advanced) * * @param fastExistsCheck the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder fastExistsCheck( String fastExistsCheck) { doSetProperty("fastExistsCheck", fastExistsCheck); return this; } /** * Set the client side port range in active mode. The syntax is: * minPort-maxPort Both port numbers are inclusive, eg 10000-19999 to * include all 1xxxx ports. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: advanced * * @param activePortRange the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder activePortRange( String activePortRange) { doSetProperty("activePortRange", activePortRange); return this; } /** * Automatically create missing directories in the file's pathname. For * the file consumer, that means creating the starting directory. For * the file producer, it means the directory the files should be written * to. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: advanced * * @param autoCreate the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder autoCreate(boolean autoCreate) { doSetProperty("autoCreate", autoCreate); return this; } /** * Automatically create missing directories in the file's pathname. For * the file consumer, that means creating the starting directory. For * the file producer, it means the directory the files should be written * to. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: advanced * * @param autoCreate the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder autoCreate(String autoCreate) { doSetProperty("autoCreate", autoCreate); return this; } /** * Buffer size in bytes used for writing files (or in case of FTP for * downloading and uploading files). * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 131072 * Group: advanced * * @param bufferSize the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder bufferSize(int bufferSize) { doSetProperty("bufferSize", bufferSize); return this; } /** * Buffer size in bytes used for writing files (or in case of FTP for * downloading and uploading files). * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 131072 * Group: advanced * * @param bufferSize the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder bufferSize(String bufferSize) { doSetProperty("bufferSize", bufferSize); return this; } /** * Sets the connect timeout for waiting for a connection to be * established Used by both FTPClient and JSCH. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 10000 * Group: advanced * * @param connectTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder connectTimeout(int connectTimeout) { doSetProperty("connectTimeout", connectTimeout); return this; } /** * Sets the connect timeout for waiting for a connection to be * established Used by both FTPClient and JSCH. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 10000 * Group: advanced * * @param connectTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder connectTimeout(String connectTimeout) { doSetProperty("connectTimeout", connectTimeout); return this; } /** * To use a custom instance of FTPClient. * * The option is a: * &lt;code&gt;org.apache.commons.net.ftp.FTPClient&lt;/code&gt; type. * * Group: advanced * * @param ftpClient the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder ftpClient( org.apache.commons.net.ftp.FTPClient ftpClient) { doSetProperty("ftpClient", ftpClient); return this; } /** * To use a custom instance of FTPClient. * * The option will be converted to a * &lt;code&gt;org.apache.commons.net.ftp.FTPClient&lt;/code&gt; type. * * Group: advanced * * @param ftpClient the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder ftpClient(String ftpClient) { doSetProperty("ftpClient", ftpClient); return this; } /** * To use a custom instance of FTPClientConfig to configure the FTP * client the endpoint should use. * * The option is a: * &lt;code&gt;org.apache.commons.net.ftp.FTPClientConfig&lt;/code&gt; * type. * * Group: advanced * * @param ftpClientConfig the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder ftpClientConfig( org.apache.commons.net.ftp.FTPClientConfig ftpClientConfig) { doSetProperty("ftpClientConfig", ftpClientConfig); return this; } /** * To use a custom instance of FTPClientConfig to configure the FTP * client the endpoint should use. * * The option will be converted to a * &lt;code&gt;org.apache.commons.net.ftp.FTPClientConfig&lt;/code&gt; * type. * * Group: advanced * * @param ftpClientConfig the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder ftpClientConfig( String ftpClientConfig) { doSetProperty("ftpClientConfig", ftpClientConfig); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClientConfig. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientConfigParameters(String, Object) method to add a value (call * the method multiple times to set more values). * * Group: advanced * * @param key the option key * @param value the option value * @return the dsl builder */ default AdvancedFtpEndpointBuilder ftpClientConfigParameters( String key, Object value) { doSetMultiValueProperty("ftpClientConfigParameters", "ftpClientConfig." + key, value); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClientConfig. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientConfigParameters(String, Object) method to add a value (call * the method multiple times to set more values). * * Group: advanced * * @param values the values * @return the dsl builder */ default AdvancedFtpEndpointBuilder ftpClientConfigParameters(Map values) { doSetMultiValueProperties("ftpClientConfigParameters", "ftpClientConfig.", values); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClient. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientParameters(String, Object) method to add a value (call the * method multiple times to set more values). * * Group: advanced * * @param key the option key * @param value the option value * @return the dsl builder */ default AdvancedFtpEndpointBuilder ftpClientParameters( String key, Object value) { doSetMultiValueProperty("ftpClientParameters", "ftpClient." + key, value); return this; } /** * Used by FtpComponent to provide additional parameters for the * FTPClient. * * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String, * java.lang.Object&amp;gt;&lt;/code&gt; type. * The option is multivalued, and you can use the * ftpClientParameters(String, Object) method to add a value (call the * method multiple times to set more values). * * Group: advanced * * @param values the values * @return the dsl builder */ default AdvancedFtpEndpointBuilder ftpClientParameters(Map values) { doSetMultiValueProperties("ftpClientParameters", "ftpClient.", values); return this; } /** * Specifies the maximum reconnect attempts Camel performs when it tries * to connect to the remote FTP server. Use 0 to disable this behavior. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Group: advanced * * @param maximumReconnectAttempts the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder maximumReconnectAttempts( int maximumReconnectAttempts) { doSetProperty("maximumReconnectAttempts", maximumReconnectAttempts); return this; } /** * Specifies the maximum reconnect attempts Camel performs when it tries * to connect to the remote FTP server. Use 0 to disable this behavior. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Group: advanced * * @param maximumReconnectAttempts the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder maximumReconnectAttempts( String maximumReconnectAttempts) { doSetProperty("maximumReconnectAttempts", maximumReconnectAttempts); return this; } /** * Delay in millis Camel will wait before performing a reconnect * attempt. * * The option is a: &lt;code&gt;long&lt;/code&gt; type. * * Default: 1000 * Group: advanced * * @param reconnectDelay the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder reconnectDelay(long reconnectDelay) { doSetProperty("reconnectDelay", reconnectDelay); return this; } /** * Delay in millis Camel will wait before performing a reconnect * attempt. * * The option will be converted to a &lt;code&gt;long&lt;/code&gt; type. * * Default: 1000 * Group: advanced * * @param reconnectDelay the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder reconnectDelay(String reconnectDelay) { doSetProperty("reconnectDelay", reconnectDelay); return this; } /** * Sets optional site command(s) to be executed after successful login. * Multiple site commands can be separated using a new line character. * * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type. * * Group: advanced * * @param siteCommand the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder siteCommand(String siteCommand) { doSetProperty("siteCommand", siteCommand); return this; } /** * Sets the so timeout FTP and FTPS Is the SocketOptions.SO_TIMEOUT * value in millis. Recommended option is to set this to 300000 so as * not have a hanged connection. On SFTP this option is set as timeout * on the JSCH Session instance. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 300000 * Group: advanced * * @param soTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder soTimeout(int soTimeout) { doSetProperty("soTimeout", soTimeout); return this; } /** * Sets the so timeout FTP and FTPS Is the SocketOptions.SO_TIMEOUT * value in millis. Recommended option is to set this to 300000 so as * not have a hanged connection. On SFTP this option is set as timeout * on the JSCH Session instance. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 300000 * Group: advanced * * @param soTimeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder soTimeout(String soTimeout) { doSetProperty("soTimeout", soTimeout); return this; } /** * Sets whether we should stepwise change directories while traversing * file structures when downloading files, or as well when uploading a * file to a directory. You can disable this if you for example are in a * situation where you cannot change directory on the FTP server due * security reasons. Stepwise cannot be used together with * streamDownload. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: true * Group: advanced * * @param stepwise the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder stepwise(boolean stepwise) { doSetProperty("stepwise", stepwise); return this; } /** * Sets whether we should stepwise change directories while traversing * file structures when downloading files, or as well when uploading a * file to a directory. You can disable this if you for example are in a * situation where you cannot change directory on the FTP server due * security reasons. Stepwise cannot be used together with * streamDownload. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: true * Group: advanced * * @param stepwise the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder stepwise(String stepwise) { doSetProperty("stepwise", stepwise); return this; } /** * Should an exception be thrown if connection failed (exhausted)By * default exception is not thrown and a WARN is logged. You can use * this to enable exception being thrown and handle the thrown exception * from the org.apache.camel.spi.PollingConsumerPollStrategy rollback * method. * * The option is a: &lt;code&gt;boolean&lt;/code&gt; type. * * Default: false * Group: advanced * * @param throwExceptionOnConnectFailed the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder throwExceptionOnConnectFailed( boolean throwExceptionOnConnectFailed) { doSetProperty("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed); return this; } /** * Should an exception be thrown if connection failed (exhausted)By * default exception is not thrown and a WARN is logged. You can use * this to enable exception being thrown and handle the thrown exception * from the org.apache.camel.spi.PollingConsumerPollStrategy rollback * method. * * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt; * type. * * Default: false * Group: advanced * * @param throwExceptionOnConnectFailed the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder throwExceptionOnConnectFailed( String throwExceptionOnConnectFailed) { doSetProperty("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed); return this; } /** * Sets the data timeout for waiting for reply Used only by FTPClient. * * The option is a: &lt;code&gt;int&lt;/code&gt; type. * * Default: 30000 * Group: advanced * * @param timeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder timeout(int timeout) { doSetProperty("timeout", timeout); return this; } /** * Sets the data timeout for waiting for reply Used only by FTPClient. * * The option will be converted to a &lt;code&gt;int&lt;/code&gt; type. * * Default: 30000 * Group: advanced * * @param timeout the value to set * @return the dsl builder */ default AdvancedFtpEndpointBuilder timeout(String timeout) { doSetProperty("timeout", timeout); return this; } } public interface FtpBuilders { /** * FTP (camel-ftp) * Upload and download files to/from FTP servers. * * Category: file * Since: 1.1 * Maven coordinates: org.apache.camel:camel-ftp * * @return the dsl builder for the headers' name. */ default FtpHeaderNameBuilder ftp() { return FtpHeaderNameBuilder.INSTANCE; } /** * FTP (camel-ftp) * Upload and download files to/from FTP servers. * * Category: file * Since: 1.1 * Maven coordinates: org.apache.camel:camel-ftp * * Syntax: <code>ftp:host:port/directoryName</code> * * Path parameter: host (required) * Hostname of the FTP server * * Path parameter: port * Port of the FTP server * * Path parameter: directoryName * The starting directory * * @param path host:port/directoryName * @return the dsl builder */ default FtpEndpointBuilder ftp(String path) { return FtpEndpointBuilderFactory.endpointBuilder("ftp", path); } /** * FTP (camel-ftp) * Upload and download files to/from FTP servers. * * Category: file * Since: 1.1 * Maven coordinates: org.apache.camel:camel-ftp * * Syntax: <code>ftp:host:port/directoryName</code> * * Path parameter: host (required) * Hostname of the FTP server * * Path parameter: port * Port of the FTP server * * Path parameter: directoryName * The starting directory * * @param componentName to use a custom component name for the endpoint * instead of the default name * @param path host:port/directoryName * @return the dsl builder */ default FtpEndpointBuilder ftp(String componentName, String path) { return FtpEndpointBuilderFactory.endpointBuilder(componentName, path); } } /** * The builder of headers' name for the FTP component. */ public static class FtpHeaderNameBuilder { /** * The internal instance of the builder used to access to all the * methods representing the name of headers. */ private static final FtpHeaderNameBuilder INSTANCE = new FtpHeaderNameBuilder(); /** * A long value containing the file size. * * The option is a: {@code long} type. * * Group: consumer * * @return the name of the header {@code FileLength}. */ public String fileLength() { return "FileLength"; } /** * A Long value containing the last modified timestamp of the file. * * The option is a: {@code long} type. * * Group: consumer * * @return the name of the header {@code FileLastModified}. */ public String fileLastModified() { return "FileLastModified"; } /** * Specifies the output file name (relative to the endpoint directory) * to be used for the output message when sending to the endpoint. If * this is not present and no expression either, then a generated * message ID is used as the filename instead. * * The option is a: {@code String} type. * * Group: common * * @return the name of the header {@code FileName}. */ public String fileName() { return "FileName"; } /** * Only the file name (the name with no leading paths). * * The option is a: {@code String} type. * * Group: common * * @return the name of the header {@code FileNameOnly}. */ public String fileNameOnly() { return "FileNameOnly"; } /** * The parent path. * * The option is a: {@code String} type. * * Group: common * * @return the name of the header {@code FileParent}. */ public String fileParent() { return "FileParent"; } /** * The remote file input stream. * * The option is a: {@code java.io.InputStream} type. * * Group: common * * @return the name of the header {@code RemoteFileInputStream}. */ public String remoteFileInputStream() { return "RemoteFileInputStream"; } /** * Path to the local work file, if local work directory is used. * * The option is a: {@code String} type. * * Group: common * * @return the name of the header {@code FileLocalWorkPath}. */ public String fileLocalWorkPath() { return "FileLocalWorkPath"; } /** * The FTP client reply code. * * The option is a: {@code int} type. * * Group: common * * @return the name of the header {@code FtpReplyCode}. */ public String ftpReplyCode() { return "FtpReplyCode"; } /** * The FTP client reply string. * * The option is a: {@code String} type. * * Group: common * * @return the name of the header {@code FtpReplyString}. */ public String ftpReplyString() { return "FtpReplyString"; } /** * The remote hostname. * * The option is a: {@code String} type. * * Group: common * * @return the name of the header {@code FileHost}. */ public String fileHost() { return "FileHost"; } } static FtpEndpointBuilder endpointBuilder(String componentName, String path) { class FtpEndpointBuilderImpl extends AbstractEndpointBuilder implements FtpEndpointBuilder, AdvancedFtpEndpointBuilder { public FtpEndpointBuilderImpl(String path) { super(componentName, path); } } return new FtpEndpointBuilderImpl(path); } }
{ "content_hash": "1105f56e267d632458469994ab097d3c", "timestamp": "", "source": "github", "line_count": 5814, "max_line_length": 171, "avg_line_length": 40.06037151702786, "alnum_prop": 0.5848242461712843, "repo_name": "apache/camel", "id": "0306aa82863fcc3346869a87daebacb4cf527195", "size": "233713", "binary": false, "copies": "5", "ref": "refs/heads/main", "path": "dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/FtpEndpointBuilderFactory.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Apex", "bytes": "6695" }, { "name": "Batchfile", "bytes": "2353" }, { "name": "CSS", "bytes": "5472" }, { "name": "Dockerfile", "bytes": "5676" }, { "name": "Elm", "bytes": "10852" }, { "name": "FreeMarker", "bytes": "8015" }, { "name": "Groovy", "bytes": "412301" }, { "name": "HTML", "bytes": "213802" }, { "name": "Java", "bytes": "114936384" }, { "name": "JavaScript", "bytes": "103655" }, { "name": "Jsonnet", "bytes": "1734" }, { "name": "Kotlin", "bytes": "41869" }, { "name": "Mustache", "bytes": "525" }, { "name": "RobotFramework", "bytes": "8461" }, { "name": "Ruby", "bytes": "88" }, { "name": "Shell", "bytes": "15327" }, { "name": "Tcl", "bytes": "4974" }, { "name": "Thrift", "bytes": "6979" }, { "name": "XQuery", "bytes": "699" }, { "name": "XSLT", "bytes": "276597" } ], "symlink_target": "" }
use WSO2::WSF; # This assumes WSF/PHP is installed and all the samples are accessible from # http://localhost/samples my $payload =<<E; <ns1:echo xmlns:ns1="http://php.axis2.org/samples"><text>Hello World!</text></ns1:echo> E my $msg = new WSO2::WSF::WSMessage( { 'to' => 'http://localhost/samples/security/timestamp/policy_file_based/service.php', 'action' => 'http://php.axis2.org/samples/echoString', 'payload' => $payload } ); open FILE, "< policy.xml"; undef $/; my $policy_xml = <FILE>; my $policy = new WSO2::WSF::WSPolicy( $policy_xml ); my $sec_token = new WSO2::WSF::WSSecurityToken( { 'ttl' => 60 } ); my $client = new WSO2::WSF::WSClient( { 'useWSA' => 'TRUE', 'policy' => $policy, 'securityToken' => $sec_token } ); my $response = $client->request( $msg ); print $response->{str};
{ "content_hash": "2081c0e4af6e5cabc00ac2e6c06bd26e", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 95, "avg_line_length": 28.29032258064516, "alnum_prop": 0.6009122006841505, "repo_name": "gitpan/WSO2-WSF-Perl", "id": "869a40a8f29faddccd72c29b14a06724881568a6", "size": "1457", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "samples/security/timestamp/timestamp_using_policy_xml.pl", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "376724" }, { "name": "Perl", "bytes": "96096" } ], "symlink_target": "" }
package com.facebook.buck.python; import com.facebook.buck.model.BuildTargets; import com.facebook.buck.rules.BuildContext; import com.facebook.buck.rules.BuildRule; import com.facebook.buck.rules.BuildRuleParams; import com.facebook.buck.rules.HasRuntimeDeps; import com.facebook.buck.rules.Label; import com.facebook.buck.rules.NoopBuildRule; import com.facebook.buck.rules.SourcePathResolver; import com.facebook.buck.rules.TestRule; import com.facebook.buck.shell.ShellStep; import com.facebook.buck.step.ExecutionContext; import com.facebook.buck.step.Step; import com.facebook.buck.step.fs.MakeCleanDirectoryStep; import com.facebook.buck.test.TestCaseSummary; import com.facebook.buck.test.TestResultSummary; import com.facebook.buck.test.TestResults; import com.facebook.buck.test.selectors.TestSelectorList; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Functions; import com.google.common.base.Optional; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedSet; import java.nio.file.Path; import java.util.concurrent.Callable; @SuppressWarnings("PMD.TestClassWithoutTestCases") public class PythonTest extends NoopBuildRule implements TestRule, HasRuntimeDeps { private final PythonBinary binary; private final ImmutableSortedSet<BuildRule> additionalDeps; private final ImmutableSet<Label> labels; private final ImmutableSet<String> contacts; private final ImmutableSet<BuildRule> sourceUnderTest; public PythonTest( BuildRuleParams params, SourcePathResolver resolver, PythonBinary binary, ImmutableSortedSet<BuildRule> additionalDeps, ImmutableSet<BuildRule> sourceUnderTest, ImmutableSet<Label> labels, ImmutableSet<String> contacts) { super(params, resolver); this.binary = binary; this.additionalDeps = additionalDeps; this.sourceUnderTest = sourceUnderTest; this.labels = labels; this.contacts = contacts; } private Step getRunTestStep() { // TODO(simons): I'm not convinced this is the right root path return new ShellStep(getProjectFilesystem().getRootPath()) { @Override protected ImmutableList<String> getShellCommandInternal(ExecutionContext context) { ImmutableList.Builder<String> builder = new ImmutableList.Builder<>(); builder.addAll(binary.getExecutableCommand().getCommandPrefix(getResolver())); builder.add("-o", getProjectFilesystem().resolve(getPathToTestOutputResult()).toString()); return builder.build(); } @Override public String getShortName() { return "pyunit"; } }; } @Override public ImmutableList<Step> runTests( BuildContext buildContext, ExecutionContext executionContext, boolean isDryRun, boolean isShufflingTests, TestSelectorList testSelectorList, TestRule.TestReportingCallback testReportingCallback) { return ImmutableList.of( new MakeCleanDirectoryStep(getProjectFilesystem(), getPathToTestOutputDirectory()), getRunTestStep()); } @Override public ImmutableSet<String> getContacts() { return contacts; } @Override public Path getPathToTestOutputDirectory() { return BuildTargets.getGenPath( getBuildTarget(), "__test_%s_output__"); } public Path getPathToTestOutputResult() { return getPathToTestOutputDirectory().resolve("results.json"); } @Override public boolean hasTestResultFiles(ExecutionContext executionContext) { return getProjectFilesystem().isFile(getPathToTestOutputResult()); } @Override public ImmutableSet<BuildRule> getSourceUnderTest() { return sourceUnderTest; } @Override public ImmutableSet<Label> getLabels() { return labels; } @Override public Callable<TestResults> interpretTestResults( final ExecutionContext executionContext, boolean isUsingTestSelectors, final boolean isDryRun) { return new Callable<TestResults>() { @Override public TestResults call() throws Exception { ImmutableList.Builder<TestCaseSummary> summaries = ImmutableList.builder(); if (!isDryRun) { Optional<String> resultsFileContents = getProjectFilesystem().readFileIfItExists( getPathToTestOutputResult()); ObjectMapper mapper = executionContext.getObjectMapper(); TestResultSummary[] testResultSummaries = mapper.readValue( resultsFileContents.get(), TestResultSummary[].class); summaries.add(new TestCaseSummary( getBuildTarget().getFullyQualifiedName(), ImmutableList.copyOf(testResultSummaries))); } return new TestResults( getBuildTarget(), summaries.build(), contacts, FluentIterable.from(labels).transform(Functions.toStringFunction()).toSet()); } }; } @Override public boolean runTestSeparately() { return false; } // A python test rule is actually just a {@link NoopBuildRule} which contains a references to // a {@link PythonBinary} rule, which is the actual test binary. Therefore, we *need* this // rule around to run this test, so model this via the {@link HasRuntimeDeps} interface. @Override public ImmutableSortedSet<BuildRule> getRuntimeDeps() { return ImmutableSortedSet.<BuildRule>naturalOrder() .add(binary) .addAll(additionalDeps) .build(); } @Override public boolean supportsStreamingTests() { return false; } @VisibleForTesting protected PythonBinary getBinary() { return binary; } }
{ "content_hash": "ecc74d83d4c54bfc0b28982db5c6c3a0", "timestamp": "", "source": "github", "line_count": 181, "max_line_length": 98, "avg_line_length": 32.30939226519337, "alnum_prop": 0.728796169630643, "repo_name": "luiseduardohdbackup/buck", "id": "a17cf575097395d232d301580e183a6704895f22", "size": "6453", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/com/facebook/buck/python/PythonTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "683" }, { "name": "C", "bytes": "245769" }, { "name": "C++", "bytes": "3765" }, { "name": "CSS", "bytes": "54863" }, { "name": "D", "bytes": "623" }, { "name": "Groff", "bytes": "440" }, { "name": "HTML", "bytes": "4938" }, { "name": "IDL", "bytes": "128" }, { "name": "Java", "bytes": "9977219" }, { "name": "JavaScript", "bytes": "931262" }, { "name": "Lex", "bytes": "2442" }, { "name": "Makefile", "bytes": "1791" }, { "name": "Matlab", "bytes": "47" }, { "name": "OCaml", "bytes": "2956" }, { "name": "Objective-C", "bytes": "67487" }, { "name": "Objective-C++", "bytes": "34" }, { "name": "PowerShell", "bytes": "143" }, { "name": "Python", "bytes": "197714" }, { "name": "Rust", "bytes": "938" }, { "name": "Shell", "bytes": "30301" }, { "name": "Smalltalk", "bytes": "438" }, { "name": "Yacc", "bytes": "323" } ], "symlink_target": "" }
/* ### * IP: GHIDRA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package agent.frida.frida; /** * An interface containing the subset of {@link FridaClient} methods which are reentrant. * * All other methods should be called only by the thread which created the client. */ public interface FridaClientReentrant { /** * Create a new client for the calling thread, connected to the same session as this client. * * @return the new client */ FridaClient createClient(); }
{ "content_hash": "833eec0f9cfd2782f27500b4c716f17e", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 93, "avg_line_length": 32.483870967741936, "alnum_prop": 0.7249255213505462, "repo_name": "NationalSecurityAgency/ghidra", "id": "5da8f83bab2bc5e00aea132495872c80edffeeec", "size": "1007", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Ghidra/Debug/Debugger-agent-frida/src/main/java/agent/frida/frida/FridaClientReentrant.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Assembly", "bytes": "77536" }, { "name": "Batchfile", "bytes": "21610" }, { "name": "C", "bytes": "1132868" }, { "name": "C++", "bytes": "7334484" }, { "name": "CSS", "bytes": "75788" }, { "name": "GAP", "bytes": "102771" }, { "name": "GDB", "bytes": "3094" }, { "name": "HTML", "bytes": "4121163" }, { "name": "Hack", "bytes": "31483" }, { "name": "Haskell", "bytes": "453" }, { "name": "Java", "bytes": "88669329" }, { "name": "JavaScript", "bytes": "1109" }, { "name": "Lex", "bytes": "22193" }, { "name": "Makefile", "bytes": "15883" }, { "name": "Objective-C", "bytes": "23937" }, { "name": "Pawn", "bytes": "82" }, { "name": "Python", "bytes": "587415" }, { "name": "Shell", "bytes": "234945" }, { "name": "TeX", "bytes": "54049" }, { "name": "XSLT", "bytes": "15056" }, { "name": "Xtend", "bytes": "115955" }, { "name": "Yacc", "bytes": "127754" } ], "symlink_target": "" }
require 'google/apis/core/base_service' require 'google/apis/core/json_representation' require 'google/apis/core/hashable' require 'google/apis/errors' module Google module Apis module DfareportingV2_5 # DCM/DFA Reporting And Trafficking API # # Manages your DoubleClick Campaign Manager ad campaigns and reports. # # @example # require 'google/apis/dfareporting_v2_5' # # Dfareporting = Google::Apis::DfareportingV2_5 # Alias the module # service = Dfareporting::DfareportingService.new # # @see https://developers.google.com/doubleclick-advertisers/reporting/ class DfareportingService < Google::Apis::Core::BaseService # @return [String] # API key. Your API key identifies your project and provides you with API access, # quota, and reports. Required unless you provide an OAuth 2.0 token. attr_accessor :key # @return [String] # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. attr_accessor :quota_user # @return [String] # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. attr_accessor :user_ip def initialize super('https://www.googleapis.com/', 'dfareporting/v2.5/') end # Gets the account's active ad summary by account ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] summary_account_id # Account ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AccountActiveAdSummary] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AccountActiveAdSummary] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_account_active_ad_summary(profile_id, summary_account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/accountActiveAdSummaries/{summaryAccountId}', options) command.response_representation = Google::Apis::DfareportingV2_5::AccountActiveAdSummary::Representation command.response_class = Google::Apis::DfareportingV2_5::AccountActiveAdSummary command.params['profileId'] = profile_id unless profile_id.nil? command.params['summaryAccountId'] = summary_account_id unless summary_account_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one account permission group by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Account permission group ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AccountPermissionGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AccountPermissionGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_account_permission_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/accountPermissionGroups/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::AccountPermissionGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::AccountPermissionGroup command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves the list of account permission groups. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListAccountPermissionGroupsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListAccountPermissionGroupsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_account_permission_groups(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/accountPermissionGroups', options) command.response_representation = Google::Apis::DfareportingV2_5::ListAccountPermissionGroupsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListAccountPermissionGroupsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one account permission by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Account permission ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AccountPermission] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AccountPermission] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_account_permission(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/accountPermissions/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::AccountPermission::Representation command.response_class = Google::Apis::DfareportingV2_5::AccountPermission command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves the list of account permissions. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListAccountPermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListAccountPermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_account_permissions(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/accountPermissions', options) command.response_representation = Google::Apis::DfareportingV2_5::ListAccountPermissionsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListAccountPermissionsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one account user profile by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # User profile ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AccountUserProfile] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AccountUserProfile] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_account_user_profile(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/accountUserProfiles/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::AccountUserProfile::Representation command.response_class = Google::Apis::DfareportingV2_5::AccountUserProfile command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new account user profile. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::AccountUserProfile] account_user_profile_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AccountUserProfile] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AccountUserProfile] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_account_user_profile(profile_id, account_user_profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/accountUserProfiles', options) command.request_representation = Google::Apis::DfareportingV2_5::AccountUserProfile::Representation command.request_object = account_user_profile_object command.response_representation = Google::Apis::DfareportingV2_5::AccountUserProfile::Representation command.response_class = Google::Apis::DfareportingV2_5::AccountUserProfile command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of account user profiles, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Boolean] active # Select only active user profiles. # @param [Array<String>, String] ids # Select only user profiles with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name, ID or email. Wildcards (*) are allowed. # For example, "user profile*2015" will return objects with names like "user # profile June 2015", "user profile April 2015", or simply "user profile 2015". # Most of the searches also add wildcards implicitly at the start and the end of # the search string. For example, a search string of "user profile" will match # objects with name "my user profile", "user profile 2015", or simply "user # profile". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] subaccount_id # Select only user profiles with the specified subaccount ID. # @param [String] user_role_id # Select only user profiles with the specified user role ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListAccountUserProfilesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListAccountUserProfilesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_account_user_profiles(profile_id, active: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, subaccount_id: nil, user_role_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/accountUserProfiles', options) command.response_representation = Google::Apis::DfareportingV2_5::ListAccountUserProfilesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListAccountUserProfilesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['active'] = active unless active.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['subaccountId'] = subaccount_id unless subaccount_id.nil? command.query['userRoleId'] = user_role_id unless user_role_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing account user profile. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # User profile ID. # @param [Google::Apis::DfareportingV2_5::AccountUserProfile] account_user_profile_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AccountUserProfile] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AccountUserProfile] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_account_user_profile(profile_id, id, account_user_profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/accountUserProfiles', options) command.request_representation = Google::Apis::DfareportingV2_5::AccountUserProfile::Representation command.request_object = account_user_profile_object command.response_representation = Google::Apis::DfareportingV2_5::AccountUserProfile::Representation command.response_class = Google::Apis::DfareportingV2_5::AccountUserProfile command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing account user profile. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::AccountUserProfile] account_user_profile_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AccountUserProfile] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AccountUserProfile] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_account_user_profile(profile_id, account_user_profile_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/accountUserProfiles', options) command.request_representation = Google::Apis::DfareportingV2_5::AccountUserProfile::Representation command.request_object = account_user_profile_object command.response_representation = Google::Apis::DfareportingV2_5::AccountUserProfile::Representation command.response_class = Google::Apis::DfareportingV2_5::AccountUserProfile command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one account by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Account ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Account] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Account] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_account(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/accounts/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Account::Representation command.response_class = Google::Apis::DfareportingV2_5::Account command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves the list of accounts, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Boolean] active # Select only active accounts. Don't set this field to select both active and # non-active accounts. # @param [Array<String>, String] ids # Select only accounts with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "account*2015" will return objects with names like "account June 2015" # , "account April 2015", or simply "account 2015". Most of the searches also # add wildcards implicitly at the start and the end of the search string. For # example, a search string of "account" will match objects with name "my account" # , "account 2015", or simply "account". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListAccountsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListAccountsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_accounts(profile_id, active: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/accounts', options) command.response_representation = Google::Apis::DfareportingV2_5::ListAccountsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListAccountsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['active'] = active unless active.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing account. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Account ID. # @param [Google::Apis::DfareportingV2_5::Account] account_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Account] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Account] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_account(profile_id, id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/accounts', options) command.request_representation = Google::Apis::DfareportingV2_5::Account::Representation command.request_object = account_object command.response_representation = Google::Apis::DfareportingV2_5::Account::Representation command.response_class = Google::Apis::DfareportingV2_5::Account command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing account. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Account] account_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Account] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Account] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_account(profile_id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/accounts', options) command.request_representation = Google::Apis::DfareportingV2_5::Account::Representation command.request_object = account_object command.response_representation = Google::Apis::DfareportingV2_5::Account::Representation command.response_class = Google::Apis::DfareportingV2_5::Account command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one ad by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Ad ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Ad] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Ad] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_ad(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/ads/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Ad::Representation command.response_class = Google::Apis::DfareportingV2_5::Ad command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new ad. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Ad] ad_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Ad] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Ad] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_ad(profile_id, ad_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/ads', options) command.request_representation = Google::Apis::DfareportingV2_5::Ad::Representation command.request_object = ad_object command.response_representation = Google::Apis::DfareportingV2_5::Ad::Representation command.response_class = Google::Apis::DfareportingV2_5::Ad command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of ads, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Boolean] active # Select only active ads. # @param [String] advertiser_id # Select only ads with this advertiser ID. # @param [Boolean] archived # Select only archived ads. # @param [Array<String>, String] audience_segment_ids # Select only ads with these audience segment IDs. # @param [Array<String>, String] campaign_ids # Select only ads with these campaign IDs. # @param [String] compatibility # Select default ads with the specified compatibility. Applicable when type is # AD_SERVING_DEFAULT_AD. DISPLAY and DISPLAY_INTERSTITIAL refer to rendering # either on desktop or on mobile devices for regular or interstitial ads, # respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps. # IN_STREAM_VIDEO refers to rendering an in-stream video ads developed with the # VAST standard. # @param [Array<String>, String] creative_ids # Select only ads with these creative IDs assigned. # @param [Array<String>, String] creative_optimization_configuration_ids # Select only ads with these creative optimization configuration IDs. # @param [String] creative_type # Select only ads with the specified creativeType. # @param [Boolean] dynamic_click_tracker # Select only dynamic click trackers. Applicable when type is # AD_SERVING_CLICK_TRACKER. If true, select dynamic click trackers. If false, # select static click trackers. Leave unset to select both. # @param [Array<String>, String] ids # Select only ads with these IDs. # @param [Array<String>, String] landing_page_ids # Select only ads with these landing page IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] overridden_event_tag_id # Select only ads with this event tag override ID. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [Array<String>, String] placement_ids # Select only ads with these placement IDs assigned. # @param [Array<String>, String] remarketing_list_ids # Select only ads whose list targeting expression use these remarketing list IDs. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "ad*2015" will return objects with names like "ad June 2015", "ad # April 2015", or simply "ad 2015". Most of the searches also add wildcards # implicitly at the start and the end of the search string. For example, a # search string of "ad" will match objects with name "my ad", "ad 2015", or # simply "ad". # @param [Array<String>, String] size_ids # Select only ads with these size IDs. # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [Boolean] ssl_compliant # Select only ads that are SSL-compliant. # @param [Boolean] ssl_required # Select only ads that require SSL. # @param [Array<String>, String] type # Select only ads with these types. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListAdsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListAdsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_ads(profile_id, active: nil, advertiser_id: nil, archived: nil, audience_segment_ids: nil, campaign_ids: nil, compatibility: nil, creative_ids: nil, creative_optimization_configuration_ids: nil, creative_type: nil, dynamic_click_tracker: nil, ids: nil, landing_page_ids: nil, max_results: nil, overridden_event_tag_id: nil, page_token: nil, placement_ids: nil, remarketing_list_ids: nil, search_string: nil, size_ids: nil, sort_field: nil, sort_order: nil, ssl_compliant: nil, ssl_required: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/ads', options) command.response_representation = Google::Apis::DfareportingV2_5::ListAdsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListAdsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['active'] = active unless active.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['archived'] = archived unless archived.nil? command.query['audienceSegmentIds'] = audience_segment_ids unless audience_segment_ids.nil? command.query['campaignIds'] = campaign_ids unless campaign_ids.nil? command.query['compatibility'] = compatibility unless compatibility.nil? command.query['creativeIds'] = creative_ids unless creative_ids.nil? command.query['creativeOptimizationConfigurationIds'] = creative_optimization_configuration_ids unless creative_optimization_configuration_ids.nil? command.query['creativeType'] = creative_type unless creative_type.nil? command.query['dynamicClickTracker'] = dynamic_click_tracker unless dynamic_click_tracker.nil? command.query['ids'] = ids unless ids.nil? command.query['landingPageIds'] = landing_page_ids unless landing_page_ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['overriddenEventTagId'] = overridden_event_tag_id unless overridden_event_tag_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['placementIds'] = placement_ids unless placement_ids.nil? command.query['remarketingListIds'] = remarketing_list_ids unless remarketing_list_ids.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sizeIds'] = size_ids unless size_ids.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['sslCompliant'] = ssl_compliant unless ssl_compliant.nil? command.query['sslRequired'] = ssl_required unless ssl_required.nil? command.query['type'] = type unless type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing ad. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Ad ID. # @param [Google::Apis::DfareportingV2_5::Ad] ad_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Ad] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Ad] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_ad(profile_id, id, ad_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/ads', options) command.request_representation = Google::Apis::DfareportingV2_5::Ad::Representation command.request_object = ad_object command.response_representation = Google::Apis::DfareportingV2_5::Ad::Representation command.response_class = Google::Apis::DfareportingV2_5::Ad command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing ad. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Ad] ad_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Ad] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Ad] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_ad(profile_id, ad_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/ads', options) command.request_representation = Google::Apis::DfareportingV2_5::Ad::Representation command.request_object = ad_object command.response_representation = Google::Apis::DfareportingV2_5::Ad::Representation command.response_class = Google::Apis::DfareportingV2_5::Ad command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an existing advertiser group. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Advertiser group ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_advertiser_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/advertiserGroups/{id}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one advertiser group by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Advertiser group ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AdvertiserGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AdvertiserGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_advertiser_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/advertiserGroups/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::AdvertiserGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::AdvertiserGroup command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new advertiser group. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::AdvertiserGroup] advertiser_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AdvertiserGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AdvertiserGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_advertiser_group(profile_id, advertiser_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/advertiserGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::AdvertiserGroup::Representation command.request_object = advertiser_group_object command.response_representation = Google::Apis::DfareportingV2_5::AdvertiserGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::AdvertiserGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of advertiser groups, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] ids # Select only advertiser groups with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "advertiser*2015" will return objects with names like "advertiser # group June 2015", "advertiser group April 2015", or simply "advertiser group # 2015". Most of the searches also add wildcards implicitly at the start and the # end of the search string. For example, a search string of "advertisergroup" # will match objects with name "my advertisergroup", "advertisergroup 2015", or # simply "advertisergroup". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListAdvertiserGroupsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListAdvertiserGroupsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_advertiser_groups(profile_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/advertiserGroups', options) command.response_representation = Google::Apis::DfareportingV2_5::ListAdvertiserGroupsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListAdvertiserGroupsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing advertiser group. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Advertiser group ID. # @param [Google::Apis::DfareportingV2_5::AdvertiserGroup] advertiser_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AdvertiserGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AdvertiserGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_advertiser_group(profile_id, id, advertiser_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/advertiserGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::AdvertiserGroup::Representation command.request_object = advertiser_group_object command.response_representation = Google::Apis::DfareportingV2_5::AdvertiserGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::AdvertiserGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing advertiser group. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::AdvertiserGroup] advertiser_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::AdvertiserGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::AdvertiserGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_advertiser_group(profile_id, advertiser_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/advertiserGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::AdvertiserGroup::Representation command.request_object = advertiser_group_object command.response_representation = Google::Apis::DfareportingV2_5::AdvertiserGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::AdvertiserGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one advertiser by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Advertiser ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Advertiser] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Advertiser] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_advertiser(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/advertisers/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Advertiser::Representation command.response_class = Google::Apis::DfareportingV2_5::Advertiser command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new advertiser. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Advertiser] advertiser_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Advertiser] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Advertiser] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_advertiser(profile_id, advertiser_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/advertisers', options) command.request_representation = Google::Apis::DfareportingV2_5::Advertiser::Representation command.request_object = advertiser_object command.response_representation = Google::Apis::DfareportingV2_5::Advertiser::Representation command.response_class = Google::Apis::DfareportingV2_5::Advertiser command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of advertisers, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] advertiser_group_ids # Select only advertisers with these advertiser group IDs. # @param [Array<String>, String] floodlight_configuration_ids # Select only advertisers with these floodlight configuration IDs. # @param [Array<String>, String] ids # Select only advertisers with these IDs. # @param [Boolean] include_advertisers_without_groups_only # Select only advertisers which do not belong to any advertiser group. # @param [Fixnum] max_results # Maximum number of results to return. # @param [Boolean] only_parent # Select only advertisers which use another advertiser's floodlight # configuration. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "advertiser*2015" will return objects with names like "advertiser # June 2015", "advertiser April 2015", or simply "advertiser 2015". Most of the # searches also add wildcards implicitly at the start and the end of the search # string. For example, a search string of "advertiser" will match objects with # name "my advertiser", "advertiser 2015", or simply "advertiser". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] status # Select only advertisers with the specified status. # @param [String] subaccount_id # Select only advertisers with these subaccount IDs. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListAdvertisersResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListAdvertisersResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_advertisers(profile_id, advertiser_group_ids: nil, floodlight_configuration_ids: nil, ids: nil, include_advertisers_without_groups_only: nil, max_results: nil, only_parent: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, status: nil, subaccount_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/advertisers', options) command.response_representation = Google::Apis::DfareportingV2_5::ListAdvertisersResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListAdvertisersResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['advertiserGroupIds'] = advertiser_group_ids unless advertiser_group_ids.nil? command.query['floodlightConfigurationIds'] = floodlight_configuration_ids unless floodlight_configuration_ids.nil? command.query['ids'] = ids unless ids.nil? command.query['includeAdvertisersWithoutGroupsOnly'] = include_advertisers_without_groups_only unless include_advertisers_without_groups_only.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['onlyParent'] = only_parent unless only_parent.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['status'] = status unless status.nil? command.query['subaccountId'] = subaccount_id unless subaccount_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing advertiser. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Advertiser ID. # @param [Google::Apis::DfareportingV2_5::Advertiser] advertiser_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Advertiser] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Advertiser] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_advertiser(profile_id, id, advertiser_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/advertisers', options) command.request_representation = Google::Apis::DfareportingV2_5::Advertiser::Representation command.request_object = advertiser_object command.response_representation = Google::Apis::DfareportingV2_5::Advertiser::Representation command.response_class = Google::Apis::DfareportingV2_5::Advertiser command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing advertiser. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Advertiser] advertiser_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Advertiser] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Advertiser] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_advertiser(profile_id, advertiser_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/advertisers', options) command.request_representation = Google::Apis::DfareportingV2_5::Advertiser::Representation command.request_object = advertiser_object command.response_representation = Google::Apis::DfareportingV2_5::Advertiser::Representation command.response_class = Google::Apis::DfareportingV2_5::Advertiser command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of browsers. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListBrowsersResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListBrowsersResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_browsers(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/browsers', options) command.response_representation = Google::Apis::DfareportingV2_5::ListBrowsersResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListBrowsersResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Associates a creative with the specified campaign. This method creates a # default ad with dimensions matching the creative in the campaign if such a # default ad does not exist already. # @param [String] profile_id # User profile ID associated with this request. # @param [String] campaign_id # Campaign ID in this association. # @param [Google::Apis::DfareportingV2_5::CampaignCreativeAssociation] campaign_creative_association_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CampaignCreativeAssociation] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CampaignCreativeAssociation] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_campaign_creative_association(profile_id, campaign_id, campaign_creative_association_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations', options) command.request_representation = Google::Apis::DfareportingV2_5::CampaignCreativeAssociation::Representation command.request_object = campaign_creative_association_object command.response_representation = Google::Apis::DfareportingV2_5::CampaignCreativeAssociation::Representation command.response_class = Google::Apis::DfareportingV2_5::CampaignCreativeAssociation command.params['profileId'] = profile_id unless profile_id.nil? command.params['campaignId'] = campaign_id unless campaign_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves the list of creative IDs associated with the specified campaign. # @param [String] profile_id # User profile ID associated with this request. # @param [String] campaign_id # Campaign ID in this association. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListCampaignCreativeAssociationsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListCampaignCreativeAssociationsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_campaign_creative_associations(profile_id, campaign_id, max_results: nil, page_token: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/campaigns/{campaignId}/campaignCreativeAssociations', options) command.response_representation = Google::Apis::DfareportingV2_5::ListCampaignCreativeAssociationsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListCampaignCreativeAssociationsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.params['campaignId'] = campaign_id unless campaign_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one campaign by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Campaign ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Campaign] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Campaign] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_campaign(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/campaigns/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Campaign::Representation command.response_class = Google::Apis::DfareportingV2_5::Campaign command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new campaign. # @param [String] profile_id # User profile ID associated with this request. # @param [String] default_landing_page_name # Default landing page name for this new campaign. Must be less than 256 # characters long. # @param [String] default_landing_page_url # Default landing page URL for this new campaign. # @param [Google::Apis::DfareportingV2_5::Campaign] campaign_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Campaign] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Campaign] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_campaign(profile_id, default_landing_page_name, default_landing_page_url, campaign_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/campaigns', options) command.request_representation = Google::Apis::DfareportingV2_5::Campaign::Representation command.request_object = campaign_object command.response_representation = Google::Apis::DfareportingV2_5::Campaign::Representation command.response_class = Google::Apis::DfareportingV2_5::Campaign command.params['profileId'] = profile_id unless profile_id.nil? command.query['defaultLandingPageName'] = default_landing_page_name unless default_landing_page_name.nil? command.query['defaultLandingPageUrl'] = default_landing_page_url unless default_landing_page_url.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of campaigns, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] advertiser_group_ids # Select only campaigns whose advertisers belong to these advertiser groups. # @param [Array<String>, String] advertiser_ids # Select only campaigns that belong to these advertisers. # @param [Boolean] archived # Select only archived campaigns. Don't set this field to select both archived # and non-archived campaigns. # @param [Boolean] at_least_one_optimization_activity # Select only campaigns that have at least one optimization activity. # @param [Array<String>, String] excluded_ids # Exclude campaigns with these IDs. # @param [Array<String>, String] ids # Select only campaigns with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] overridden_event_tag_id # Select only campaigns that have overridden this event tag ID. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for campaigns by name or ID. Wildcards (*) are allowed. For # example, "campaign*2015" will return campaigns with names like "campaign June # 2015", "campaign April 2015", or simply "campaign 2015". Most of the searches # also add wildcards implicitly at the start and the end of the search string. # For example, a search string of "campaign" will match campaigns with name "my # campaign", "campaign 2015", or simply "campaign". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] subaccount_id # Select only campaigns that belong to this subaccount. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListCampaignsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListCampaignsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_campaigns(profile_id, advertiser_group_ids: nil, advertiser_ids: nil, archived: nil, at_least_one_optimization_activity: nil, excluded_ids: nil, ids: nil, max_results: nil, overridden_event_tag_id: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, subaccount_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/campaigns', options) command.response_representation = Google::Apis::DfareportingV2_5::ListCampaignsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListCampaignsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['advertiserGroupIds'] = advertiser_group_ids unless advertiser_group_ids.nil? command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? command.query['archived'] = archived unless archived.nil? command.query['atLeastOneOptimizationActivity'] = at_least_one_optimization_activity unless at_least_one_optimization_activity.nil? command.query['excludedIds'] = excluded_ids unless excluded_ids.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['overriddenEventTagId'] = overridden_event_tag_id unless overridden_event_tag_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['subaccountId'] = subaccount_id unless subaccount_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing campaign. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Campaign ID. # @param [Google::Apis::DfareportingV2_5::Campaign] campaign_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Campaign] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Campaign] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_campaign(profile_id, id, campaign_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/campaigns', options) command.request_representation = Google::Apis::DfareportingV2_5::Campaign::Representation command.request_object = campaign_object command.response_representation = Google::Apis::DfareportingV2_5::Campaign::Representation command.response_class = Google::Apis::DfareportingV2_5::Campaign command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing campaign. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Campaign] campaign_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Campaign] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Campaign] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_campaign(profile_id, campaign_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/campaigns', options) command.request_representation = Google::Apis::DfareportingV2_5::Campaign::Representation command.request_object = campaign_object command.response_representation = Google::Apis::DfareportingV2_5::Campaign::Representation command.response_class = Google::Apis::DfareportingV2_5::Campaign command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one change log by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Change log ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ChangeLog] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ChangeLog] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_change_log(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/changeLogs/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::ChangeLog::Representation command.response_class = Google::Apis::DfareportingV2_5::ChangeLog command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of change logs. # @param [String] profile_id # User profile ID associated with this request. # @param [String] action # Select only change logs with the specified action. # @param [Array<String>, String] ids # Select only change logs with these IDs. # @param [String] max_change_time # Select only change logs whose change time is before the specified # maxChangeTime.The time should be formatted as an RFC3339 date/time string. For # example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, # the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, # day, the letter T, the hour (24-hour clock system), minute, second, and then # the time zone offset. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] min_change_time # Select only change logs whose change time is before the specified # minChangeTime.The time should be formatted as an RFC3339 date/time string. For # example, for 10:54 PM on July 18th, 2015, in the America/New York time zone, # the format is "2015-07-18T22:54:00-04:00". In other words, the year, month, # day, the letter T, the hour (24-hour clock system), minute, second, and then # the time zone offset. # @param [Array<String>, String] object_ids # Select only change logs with these object IDs. # @param [String] object_type # Select only change logs with the specified object type. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Select only change logs whose object ID, user name, old or new values match # the search string. # @param [Array<String>, String] user_profile_ids # Select only change logs with these user profile IDs. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListChangeLogsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListChangeLogsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_change_logs(profile_id, action: nil, ids: nil, max_change_time: nil, max_results: nil, min_change_time: nil, object_ids: nil, object_type: nil, page_token: nil, search_string: nil, user_profile_ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/changeLogs', options) command.response_representation = Google::Apis::DfareportingV2_5::ListChangeLogsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListChangeLogsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['action'] = action unless action.nil? command.query['ids'] = ids unless ids.nil? command.query['maxChangeTime'] = max_change_time unless max_change_time.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['minChangeTime'] = min_change_time unless min_change_time.nil? command.query['objectIds'] = object_ids unless object_ids.nil? command.query['objectType'] = object_type unless object_type.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['userProfileIds'] = user_profile_ids unless user_profile_ids.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of cities, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] country_dart_ids # Select only cities from these countries. # @param [Array<String>, String] dart_ids # Select only cities with these DART IDs. # @param [String] name_prefix # Select only cities with names starting with this prefix. # @param [Array<String>, String] region_dart_ids # Select only cities from these regions. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListCitiesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListCitiesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_cities(profile_id, country_dart_ids: nil, dart_ids: nil, name_prefix: nil, region_dart_ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/cities', options) command.response_representation = Google::Apis::DfareportingV2_5::ListCitiesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListCitiesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['countryDartIds'] = country_dart_ids unless country_dart_ids.nil? command.query['dartIds'] = dart_ids unless dart_ids.nil? command.query['namePrefix'] = name_prefix unless name_prefix.nil? command.query['regionDartIds'] = region_dart_ids unless region_dart_ids.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one connection type by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Connection type ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ConnectionType] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ConnectionType] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_connection_type(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/connectionTypes/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::ConnectionType::Representation command.response_class = Google::Apis::DfareportingV2_5::ConnectionType command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of connection types. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListConnectionTypesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListConnectionTypesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_connection_types(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/connectionTypes', options) command.response_representation = Google::Apis::DfareportingV2_5::ListConnectionTypesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListConnectionTypesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an existing content category. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Content category ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_content_category(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/contentCategories/{id}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one content category by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Content category ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ContentCategory] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ContentCategory] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_content_category(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/contentCategories/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::ContentCategory::Representation command.response_class = Google::Apis::DfareportingV2_5::ContentCategory command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new content category. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::ContentCategory] content_category_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ContentCategory] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ContentCategory] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_content_category(profile_id, content_category_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/contentCategories', options) command.request_representation = Google::Apis::DfareportingV2_5::ContentCategory::Representation command.request_object = content_category_object command.response_representation = Google::Apis::DfareportingV2_5::ContentCategory::Representation command.response_class = Google::Apis::DfareportingV2_5::ContentCategory command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of content categories, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] ids # Select only content categories with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "contentcategory*2015" will return objects with names like " # contentcategory June 2015", "contentcategory April 2015", or simply " # contentcategory 2015". Most of the searches also add wildcards implicitly at # the start and the end of the search string. For example, a search string of " # contentcategory" will match objects with name "my contentcategory", " # contentcategory 2015", or simply "contentcategory". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListContentCategoriesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListContentCategoriesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_content_categories(profile_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/contentCategories', options) command.response_representation = Google::Apis::DfareportingV2_5::ListContentCategoriesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListContentCategoriesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing content category. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Content category ID. # @param [Google::Apis::DfareportingV2_5::ContentCategory] content_category_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ContentCategory] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ContentCategory] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_content_category(profile_id, id, content_category_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/contentCategories', options) command.request_representation = Google::Apis::DfareportingV2_5::ContentCategory::Representation command.request_object = content_category_object command.response_representation = Google::Apis::DfareportingV2_5::ContentCategory::Representation command.response_class = Google::Apis::DfareportingV2_5::ContentCategory command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing content category. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::ContentCategory] content_category_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ContentCategory] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ContentCategory] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_content_category(profile_id, content_category_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/contentCategories', options) command.request_representation = Google::Apis::DfareportingV2_5::ContentCategory::Representation command.request_object = content_category_object command.response_representation = Google::Apis::DfareportingV2_5::ContentCategory::Representation command.response_class = Google::Apis::DfareportingV2_5::ContentCategory command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts conversions. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::ConversionsBatchInsertRequest] conversions_batch_insert_request_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ConversionsBatchInsertResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ConversionsBatchInsertResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def batchinsert_conversion(profile_id, conversions_batch_insert_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/conversions/batchinsert', options) command.request_representation = Google::Apis::DfareportingV2_5::ConversionsBatchInsertRequest::Representation command.request_object = conversions_batch_insert_request_object command.response_representation = Google::Apis::DfareportingV2_5::ConversionsBatchInsertResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ConversionsBatchInsertResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one country by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] dart_id # Country DART ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Country] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Country] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_country(profile_id, dart_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/countries/{dartId}', options) command.response_representation = Google::Apis::DfareportingV2_5::Country::Representation command.response_class = Google::Apis::DfareportingV2_5::Country command.params['profileId'] = profile_id unless profile_id.nil? command.params['dartId'] = dart_id unless dart_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of countries. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListCountriesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListCountriesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_countries(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/countries', options) command.response_representation = Google::Apis::DfareportingV2_5::ListCountriesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListCountriesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new creative asset. # @param [String] profile_id # User profile ID associated with this request. # @param [String] advertiser_id # Advertiser ID of this creative. This is a required field. # @param [Google::Apis::DfareportingV2_5::CreativeAssetMetadata] creative_asset_metadata_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [IO, String] upload_source # IO stream or filename containing content to upload # @param [String] content_type # Content type of the uploaded content. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeAssetMetadata] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeAssetMetadata] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_creative_asset(profile_id, advertiser_id, creative_asset_metadata_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets', options) else command = make_upload_command(:post, 'userprofiles/{profileId}/creativeAssets/{advertiserId}/creativeAssets', options) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::DfareportingV2_5::CreativeAssetMetadata::Representation command.request_object = creative_asset_metadata_object command.response_representation = Google::Apis::DfareportingV2_5::CreativeAssetMetadata::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeAssetMetadata command.params['profileId'] = profile_id unless profile_id.nil? command.params['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an existing creative field value. # @param [String] profile_id # User profile ID associated with this request. # @param [String] creative_field_id # Creative field ID for this creative field value. # @param [String] id # Creative Field Value ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_creative_field_value(profile_id, creative_field_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['creativeFieldId'] = creative_field_id unless creative_field_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one creative field value by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] creative_field_id # Creative field ID for this creative field value. # @param [String] id # Creative Field Value ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeFieldValue] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeFieldValue] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_creative_field_value(profile_id, creative_field_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::CreativeFieldValue::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeFieldValue command.params['profileId'] = profile_id unless profile_id.nil? command.params['creativeFieldId'] = creative_field_id unless creative_field_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new creative field value. # @param [String] profile_id # User profile ID associated with this request. # @param [String] creative_field_id # Creative field ID for this creative field value. # @param [Google::Apis::DfareportingV2_5::CreativeFieldValue] creative_field_value_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeFieldValue] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeFieldValue] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_creative_field_value(profile_id, creative_field_id, creative_field_value_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues', options) command.request_representation = Google::Apis::DfareportingV2_5::CreativeFieldValue::Representation command.request_object = creative_field_value_object command.response_representation = Google::Apis::DfareportingV2_5::CreativeFieldValue::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeFieldValue command.params['profileId'] = profile_id unless profile_id.nil? command.params['creativeFieldId'] = creative_field_id unless creative_field_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of creative field values, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [String] creative_field_id # Creative field ID for this creative field value. # @param [Array<String>, String] ids # Select only creative field values with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for creative field values by their values. Wildcards (e.g. *) # are not allowed. # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListCreativeFieldValuesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListCreativeFieldValuesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_creative_field_values(profile_id, creative_field_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues', options) command.response_representation = Google::Apis::DfareportingV2_5::ListCreativeFieldValuesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListCreativeFieldValuesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.params['creativeFieldId'] = creative_field_id unless creative_field_id.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing creative field value. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] creative_field_id # Creative field ID for this creative field value. # @param [String] id # Creative Field Value ID # @param [Google::Apis::DfareportingV2_5::CreativeFieldValue] creative_field_value_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeFieldValue] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeFieldValue] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_creative_field_value(profile_id, creative_field_id, id, creative_field_value_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues', options) command.request_representation = Google::Apis::DfareportingV2_5::CreativeFieldValue::Representation command.request_object = creative_field_value_object command.response_representation = Google::Apis::DfareportingV2_5::CreativeFieldValue::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeFieldValue command.params['profileId'] = profile_id unless profile_id.nil? command.params['creativeFieldId'] = creative_field_id unless creative_field_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing creative field value. # @param [String] profile_id # User profile ID associated with this request. # @param [String] creative_field_id # Creative field ID for this creative field value. # @param [Google::Apis::DfareportingV2_5::CreativeFieldValue] creative_field_value_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeFieldValue] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeFieldValue] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_creative_field_value(profile_id, creative_field_id, creative_field_value_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/creativeFields/{creativeFieldId}/creativeFieldValues', options) command.request_representation = Google::Apis::DfareportingV2_5::CreativeFieldValue::Representation command.request_object = creative_field_value_object command.response_representation = Google::Apis::DfareportingV2_5::CreativeFieldValue::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeFieldValue command.params['profileId'] = profile_id unless profile_id.nil? command.params['creativeFieldId'] = creative_field_id unless creative_field_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an existing creative field. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Creative Field ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_creative_field(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/creativeFields/{id}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one creative field by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Creative Field ID # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeField] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeField] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_creative_field(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/creativeFields/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::CreativeField::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeField command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new creative field. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::CreativeField] creative_field_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeField] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeField] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_creative_field(profile_id, creative_field_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/creativeFields', options) command.request_representation = Google::Apis::DfareportingV2_5::CreativeField::Representation command.request_object = creative_field_object command.response_representation = Google::Apis::DfareportingV2_5::CreativeField::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeField command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of creative fields, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] advertiser_ids # Select only creative fields that belong to these advertisers. # @param [Array<String>, String] ids # Select only creative fields with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for creative fields by name or ID. Wildcards (*) are allowed. # For example, "creativefield*2015" will return creative fields with names like " # creativefield June 2015", "creativefield April 2015", or simply "creativefield # 2015". Most of the searches also add wild-cards implicitly at the start and # the end of the search string. For example, a search string of "creativefield" # will match creative fields with the name "my creativefield", "creativefield # 2015", or simply "creativefield". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListCreativeFieldsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListCreativeFieldsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_creative_fields(profile_id, advertiser_ids: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/creativeFields', options) command.response_representation = Google::Apis::DfareportingV2_5::ListCreativeFieldsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListCreativeFieldsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing creative field. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Creative Field ID # @param [Google::Apis::DfareportingV2_5::CreativeField] creative_field_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeField] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeField] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_creative_field(profile_id, id, creative_field_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/creativeFields', options) command.request_representation = Google::Apis::DfareportingV2_5::CreativeField::Representation command.request_object = creative_field_object command.response_representation = Google::Apis::DfareportingV2_5::CreativeField::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeField command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing creative field. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::CreativeField] creative_field_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeField] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeField] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_creative_field(profile_id, creative_field_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/creativeFields', options) command.request_representation = Google::Apis::DfareportingV2_5::CreativeField::Representation command.request_object = creative_field_object command.response_representation = Google::Apis::DfareportingV2_5::CreativeField::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeField command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one creative group by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Creative group ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_creative_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/creativeGroups/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::CreativeGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeGroup command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new creative group. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::CreativeGroup] creative_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_creative_group(profile_id, creative_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/creativeGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::CreativeGroup::Representation command.request_object = creative_group_object command.response_representation = Google::Apis::DfareportingV2_5::CreativeGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of creative groups, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] advertiser_ids # Select only creative groups that belong to these advertisers. # @param [Fixnum] group_number # Select only creative groups that belong to this subgroup. # @param [Array<String>, String] ids # Select only creative groups with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for creative groups by name or ID. Wildcards (*) are allowed. # For example, "creativegroup*2015" will return creative groups with names like " # creativegroup June 2015", "creativegroup April 2015", or simply "creativegroup # 2015". Most of the searches also add wild-cards implicitly at the start and # the end of the search string. For example, a search string of "creativegroup" # will match creative groups with the name "my creativegroup", "creativegroup # 2015", or simply "creativegroup". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListCreativeGroupsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListCreativeGroupsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_creative_groups(profile_id, advertiser_ids: nil, group_number: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/creativeGroups', options) command.response_representation = Google::Apis::DfareportingV2_5::ListCreativeGroupsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListCreativeGroupsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? command.query['groupNumber'] = group_number unless group_number.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing creative group. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Creative group ID. # @param [Google::Apis::DfareportingV2_5::CreativeGroup] creative_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_creative_group(profile_id, id, creative_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/creativeGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::CreativeGroup::Representation command.request_object = creative_group_object command.response_representation = Google::Apis::DfareportingV2_5::CreativeGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing creative group. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::CreativeGroup] creative_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CreativeGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CreativeGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_creative_group(profile_id, creative_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/creativeGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::CreativeGroup::Representation command.request_object = creative_group_object command.response_representation = Google::Apis::DfareportingV2_5::CreativeGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::CreativeGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one creative by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Creative ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Creative] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Creative] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_creative(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/creatives/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Creative::Representation command.response_class = Google::Apis::DfareportingV2_5::Creative command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new creative. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Creative] creative_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Creative] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Creative] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_creative(profile_id, creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/creatives', options) command.request_representation = Google::Apis::DfareportingV2_5::Creative::Representation command.request_object = creative_object command.response_representation = Google::Apis::DfareportingV2_5::Creative::Representation command.response_class = Google::Apis::DfareportingV2_5::Creative command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of creatives, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Boolean] active # Select only active creatives. Leave blank to select active and inactive # creatives. # @param [String] advertiser_id # Select only creatives with this advertiser ID. # @param [Boolean] archived # Select only archived creatives. Leave blank to select archived and unarchived # creatives. # @param [String] campaign_id # Select only creatives with this campaign ID. # @param [Array<String>, String] companion_creative_ids # Select only in-stream video creatives with these companion IDs. # @param [Array<String>, String] creative_field_ids # Select only creatives with these creative field IDs. # @param [Array<String>, String] ids # Select only creatives with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [Array<String>, String] rendering_ids # Select only creatives with these rendering IDs. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "creative*2015" will return objects with names like "creative June # 2015", "creative April 2015", or simply "creative 2015". Most of the searches # also add wildcards implicitly at the start and the end of the search string. # For example, a search string of "creative" will match objects with name "my # creative", "creative 2015", or simply "creative". # @param [Array<String>, String] size_ids # Select only creatives with these size IDs. # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] studio_creative_id # Select only creatives corresponding to this Studio creative ID. # @param [Array<String>, String] types # Select only creatives with these creative types. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListCreativesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListCreativesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_creatives(profile_id, active: nil, advertiser_id: nil, archived: nil, campaign_id: nil, companion_creative_ids: nil, creative_field_ids: nil, ids: nil, max_results: nil, page_token: nil, rendering_ids: nil, search_string: nil, size_ids: nil, sort_field: nil, sort_order: nil, studio_creative_id: nil, types: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/creatives', options) command.response_representation = Google::Apis::DfareportingV2_5::ListCreativesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListCreativesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['active'] = active unless active.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['archived'] = archived unless archived.nil? command.query['campaignId'] = campaign_id unless campaign_id.nil? command.query['companionCreativeIds'] = companion_creative_ids unless companion_creative_ids.nil? command.query['creativeFieldIds'] = creative_field_ids unless creative_field_ids.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['renderingIds'] = rendering_ids unless rendering_ids.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sizeIds'] = size_ids unless size_ids.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['studioCreativeId'] = studio_creative_id unless studio_creative_id.nil? command.query['types'] = types unless types.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing creative. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Creative ID. # @param [Google::Apis::DfareportingV2_5::Creative] creative_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Creative] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Creative] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_creative(profile_id, id, creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/creatives', options) command.request_representation = Google::Apis::DfareportingV2_5::Creative::Representation command.request_object = creative_object command.response_representation = Google::Apis::DfareportingV2_5::Creative::Representation command.response_class = Google::Apis::DfareportingV2_5::Creative command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing creative. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Creative] creative_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Creative] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Creative] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_creative(profile_id, creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/creatives', options) command.request_representation = Google::Apis::DfareportingV2_5::Creative::Representation command.request_object = creative_object command.response_representation = Google::Apis::DfareportingV2_5::Creative::Representation command.response_class = Google::Apis::DfareportingV2_5::Creative command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves list of report dimension values for a list of filters. # @param [String] profile_id # The DFA user profile ID. # @param [Google::Apis::DfareportingV2_5::DimensionValueRequest] dimension_value_request_object # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # The value of the nextToken from the previous result page. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::DimensionValueList] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::DimensionValueList] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def query_dimension_value(profile_id, dimension_value_request_object = nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/dimensionvalues/query', options) command.request_representation = Google::Apis::DfareportingV2_5::DimensionValueRequest::Representation command.request_object = dimension_value_request_object command.response_representation = Google::Apis::DfareportingV2_5::DimensionValueList::Representation command.response_class = Google::Apis::DfareportingV2_5::DimensionValueList command.params['profileId'] = profile_id unless profile_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one directory site contact by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Directory site contact ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::DirectorySiteContact] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::DirectorySiteContact] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_directory_site_contact(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/directorySiteContacts/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::DirectorySiteContact::Representation command.response_class = Google::Apis::DfareportingV2_5::DirectorySiteContact command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of directory site contacts, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] directory_site_ids # Select only directory site contacts with these directory site IDs. This is a # required field. # @param [Array<String>, String] ids # Select only directory site contacts with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name, ID or email. Wildcards (*) are allowed. # For example, "directory site contact*2015" will return objects with names like # "directory site contact June 2015", "directory site contact April 2015", or # simply "directory site contact 2015". Most of the searches also add wildcards # implicitly at the start and the end of the search string. For example, a # search string of "directory site contact" will match objects with name "my # directory site contact", "directory site contact 2015", or simply "directory # site contact". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListDirectorySiteContactsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListDirectorySiteContactsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_directory_site_contacts(profile_id, directory_site_ids: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/directorySiteContacts', options) command.response_representation = Google::Apis::DfareportingV2_5::ListDirectorySiteContactsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListDirectorySiteContactsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['directorySiteIds'] = directory_site_ids unless directory_site_ids.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one directory site by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Directory site ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::DirectorySite] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::DirectorySite] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_directory_site(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/directorySites/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::DirectorySite::Representation command.response_class = Google::Apis::DfareportingV2_5::DirectorySite command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new directory site. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::DirectorySite] directory_site_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::DirectorySite] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::DirectorySite] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_directory_site(profile_id, directory_site_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/directorySites', options) command.request_representation = Google::Apis::DfareportingV2_5::DirectorySite::Representation command.request_object = directory_site_object command.response_representation = Google::Apis::DfareportingV2_5::DirectorySite::Representation command.response_class = Google::Apis::DfareportingV2_5::DirectorySite command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of directory sites, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Boolean] accepts_in_stream_video_placements # This search filter is no longer supported and will have no effect on the # results returned. # @param [Boolean] accepts_interstitial_placements # This search filter is no longer supported and will have no effect on the # results returned. # @param [Boolean] accepts_publisher_paid_placements # Select only directory sites that accept publisher paid placements. This field # can be left blank. # @param [Boolean] active # Select only active directory sites. Leave blank to retrieve both active and # inactive directory sites. # @param [String] country_id # Select only directory sites with this country ID. # @param [String] dfp_network_code # Select only directory sites with this DFP network code. # @param [Array<String>, String] ids # Select only directory sites with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] parent_id # Select only directory sites with this parent ID. # @param [String] search_string # Allows searching for objects by name, ID or URL. Wildcards (*) are allowed. # For example, "directory site*2015" will return objects with names like " # directory site June 2015", "directory site April 2015", or simply "directory # site 2015". Most of the searches also add wildcards implicitly at the start # and the end of the search string. For example, a search string of "directory # site" will match objects with name "my directory site", "directory site 2015" # or simply, "directory site". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListDirectorySitesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListDirectorySitesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_directory_sites(profile_id, accepts_in_stream_video_placements: nil, accepts_interstitial_placements: nil, accepts_publisher_paid_placements: nil, active: nil, country_id: nil, dfp_network_code: nil, ids: nil, max_results: nil, page_token: nil, parent_id: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/directorySites', options) command.response_representation = Google::Apis::DfareportingV2_5::ListDirectorySitesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListDirectorySitesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['acceptsInStreamVideoPlacements'] = accepts_in_stream_video_placements unless accepts_in_stream_video_placements.nil? command.query['acceptsInterstitialPlacements'] = accepts_interstitial_placements unless accepts_interstitial_placements.nil? command.query['acceptsPublisherPaidPlacements'] = accepts_publisher_paid_placements unless accepts_publisher_paid_placements.nil? command.query['active'] = active unless active.nil? command.query['countryId'] = country_id unless country_id.nil? command.query['dfp_network_code'] = dfp_network_code unless dfp_network_code.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['parentId'] = parent_id unless parent_id.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an existing dynamic targeting key. # @param [String] profile_id # User profile ID associated with this request. # @param [String] object_id_ # ID of the object of this dynamic targeting key. This is a required field. # @param [String] name # Name of this dynamic targeting key. This is a required field. Must be less # than 256 characters long and cannot contain commas. All characters are # converted to lowercase. # @param [String] object_type # Type of the object of this dynamic targeting key. This is a required field. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_dynamic_targeting_key(profile_id, object_id_, name, object_type, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/dynamicTargetingKeys/{objectId}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['objectId'] = object_id_ unless object_id_.nil? command.query['name'] = name unless name.nil? command.query['objectType'] = object_type unless object_type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new dynamic targeting key. Keys must be created at the advertiser # level before being assigned to the advertiser's ads, creatives, or placements. # There is a maximum of 1000 keys per advertiser, out of which a maximum of 20 # keys can be assigned per ad, creative, or placement. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::DynamicTargetingKey] dynamic_targeting_key_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::DynamicTargetingKey] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::DynamicTargetingKey] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_dynamic_targeting_key(profile_id, dynamic_targeting_key_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/dynamicTargetingKeys', options) command.request_representation = Google::Apis::DfareportingV2_5::DynamicTargetingKey::Representation command.request_object = dynamic_targeting_key_object command.response_representation = Google::Apis::DfareportingV2_5::DynamicTargetingKey::Representation command.response_class = Google::Apis::DfareportingV2_5::DynamicTargetingKey command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of dynamic targeting keys. # @param [String] profile_id # User profile ID associated with this request. # @param [String] advertiser_id # Select only dynamic targeting keys whose object has this advertiser ID. # @param [Array<String>, String] names # Select only dynamic targeting keys exactly matching these names. # @param [String] object_id_ # Select only dynamic targeting keys with this object ID. # @param [String] object_type # Select only dynamic targeting keys with this object type. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::DynamicTargetingKeysListResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::DynamicTargetingKeysListResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_dynamic_targeting_keys(profile_id, advertiser_id: nil, names: nil, object_id_: nil, object_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/dynamicTargetingKeys', options) command.response_representation = Google::Apis::DfareportingV2_5::DynamicTargetingKeysListResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::DynamicTargetingKeysListResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['names'] = names unless names.nil? command.query['objectId'] = object_id_ unless object_id_.nil? command.query['objectType'] = object_type unless object_type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an existing event tag. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Event tag ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_event_tag(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/eventTags/{id}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one event tag by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Event tag ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::EventTag] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::EventTag] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_event_tag(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/eventTags/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::EventTag::Representation command.response_class = Google::Apis::DfareportingV2_5::EventTag command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new event tag. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::EventTag] event_tag_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::EventTag] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::EventTag] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_event_tag(profile_id, event_tag_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/eventTags', options) command.request_representation = Google::Apis::DfareportingV2_5::EventTag::Representation command.request_object = event_tag_object command.response_representation = Google::Apis::DfareportingV2_5::EventTag::Representation command.response_class = Google::Apis::DfareportingV2_5::EventTag command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of event tags, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [String] ad_id # Select only event tags that belong to this ad. # @param [String] advertiser_id # Select only event tags that belong to this advertiser. # @param [String] campaign_id # Select only event tags that belong to this campaign. # @param [Boolean] definitions_only # Examine only the specified campaign or advertiser's event tags for matching # selector criteria. When set to false, the parent advertiser and parent # campaign of the specified ad or campaign is examined as well. In addition, # when set to false, the status field is examined as well, along with the # enabledByDefault field. This parameter can not be set to true when adId is # specified as ads do not define their own even tags. # @param [Boolean] enabled # Select only enabled event tags. What is considered enabled or disabled depends # on the definitionsOnly parameter. When definitionsOnly is set to true, only # the specified advertiser or campaign's event tags' enabledByDefault field is # examined. When definitionsOnly is set to false, the specified ad or specified # campaign's parent advertiser's or parent campaign's event tags' # enabledByDefault and status fields are examined as well. # @param [Array<String>, String] event_tag_types # Select only event tags with the specified event tag types. Event tag types can # be used to specify whether to use a third-party pixel, a third-party # JavaScript URL, or a third-party click-through URL for either impression or # click tracking. # @param [Array<String>, String] ids # Select only event tags with these IDs. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "eventtag*2015" will return objects with names like "eventtag June # 2015", "eventtag April 2015", or simply "eventtag 2015". Most of the searches # also add wildcards implicitly at the start and the end of the search string. # For example, a search string of "eventtag" will match objects with name "my # eventtag", "eventtag 2015", or simply "eventtag". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListEventTagsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListEventTagsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_event_tags(profile_id, ad_id: nil, advertiser_id: nil, campaign_id: nil, definitions_only: nil, enabled: nil, event_tag_types: nil, ids: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/eventTags', options) command.response_representation = Google::Apis::DfareportingV2_5::ListEventTagsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListEventTagsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['adId'] = ad_id unless ad_id.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['campaignId'] = campaign_id unless campaign_id.nil? command.query['definitionsOnly'] = definitions_only unless definitions_only.nil? command.query['enabled'] = enabled unless enabled.nil? command.query['eventTagTypes'] = event_tag_types unless event_tag_types.nil? command.query['ids'] = ids unless ids.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing event tag. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Event tag ID. # @param [Google::Apis::DfareportingV2_5::EventTag] event_tag_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::EventTag] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::EventTag] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_event_tag(profile_id, id, event_tag_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/eventTags', options) command.request_representation = Google::Apis::DfareportingV2_5::EventTag::Representation command.request_object = event_tag_object command.response_representation = Google::Apis::DfareportingV2_5::EventTag::Representation command.response_class = Google::Apis::DfareportingV2_5::EventTag command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing event tag. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::EventTag] event_tag_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::EventTag] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::EventTag] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_event_tag(profile_id, event_tag_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/eventTags', options) command.request_representation = Google::Apis::DfareportingV2_5::EventTag::Representation command.request_object = event_tag_object command.response_representation = Google::Apis::DfareportingV2_5::EventTag::Representation command.response_class = Google::Apis::DfareportingV2_5::EventTag command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a report file by its report ID and file ID. # @param [String] report_id # The ID of the report. # @param [String] file_id # The ID of the report file. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [IO, String] download_dest # IO stream or filename to receive content download # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::File] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::File] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_file(report_id, file_id, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'reports/{reportId}/files/{fileId}', options) else command = make_download_command(:get, 'reports/{reportId}/files/{fileId}', options) command.download_dest = download_dest end command.response_representation = Google::Apis::DfareportingV2_5::File::Representation command.response_class = Google::Apis::DfareportingV2_5::File command.params['reportId'] = report_id unless report_id.nil? command.params['fileId'] = file_id unless file_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Lists files for a user profile. # @param [String] profile_id # The DFA profile ID. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # The value of the nextToken from the previous result page. # @param [String] scope # The scope that defines which results are returned, default is 'MINE'. # @param [String] sort_field # The field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is 'DESCENDING'. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FileList] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FileList] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_files(profile_id, max_results: nil, page_token: nil, scope: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/files', options) command.response_representation = Google::Apis::DfareportingV2_5::FileList::Representation command.response_class = Google::Apis::DfareportingV2_5::FileList command.params['profileId'] = profile_id unless profile_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['scope'] = scope unless scope.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an existing floodlight activity. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Floodlight activity ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_floodlight_activity(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/floodlightActivities/{id}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Generates a tag for a floodlight activity. # @param [String] profile_id # User profile ID associated with this request. # @param [String] floodlight_activity_id # Floodlight activity ID for which we want to generate a tag. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightActivitiesGenerateTagResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightActivitiesGenerateTagResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def generate_floodlight_activity_tag(profile_id, floodlight_activity_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/floodlightActivities/generatetag', options) command.response_representation = Google::Apis::DfareportingV2_5::FloodlightActivitiesGenerateTagResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightActivitiesGenerateTagResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['floodlightActivityId'] = floodlight_activity_id unless floodlight_activity_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one floodlight activity by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Floodlight activity ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightActivity] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightActivity] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_floodlight_activity(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/floodlightActivities/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::FloodlightActivity::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightActivity command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new floodlight activity. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::FloodlightActivity] floodlight_activity_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightActivity] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightActivity] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_floodlight_activity(profile_id, floodlight_activity_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/floodlightActivities', options) command.request_representation = Google::Apis::DfareportingV2_5::FloodlightActivity::Representation command.request_object = floodlight_activity_object command.response_representation = Google::Apis::DfareportingV2_5::FloodlightActivity::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightActivity command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of floodlight activities, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [String] advertiser_id # Select only floodlight activities for the specified advertiser ID. Must # specify either ids, advertiserId, or floodlightConfigurationId for a non-empty # result. # @param [Array<String>, String] floodlight_activity_group_ids # Select only floodlight activities with the specified floodlight activity group # IDs. # @param [String] floodlight_activity_group_name # Select only floodlight activities with the specified floodlight activity group # name. # @param [String] floodlight_activity_group_tag_string # Select only floodlight activities with the specified floodlight activity group # tag string. # @param [String] floodlight_activity_group_type # Select only floodlight activities with the specified floodlight activity group # type. # @param [String] floodlight_configuration_id # Select only floodlight activities for the specified floodlight configuration # ID. Must specify either ids, advertiserId, or floodlightConfigurationId for a # non-empty result. # @param [Array<String>, String] ids # Select only floodlight activities with the specified IDs. Must specify either # ids, advertiserId, or floodlightConfigurationId for a non-empty result. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "floodlightactivity*2015" will return objects with names like " # floodlightactivity June 2015", "floodlightactivity April 2015", or simply " # floodlightactivity 2015". Most of the searches also add wildcards implicitly # at the start and the end of the search string. For example, a search string of # "floodlightactivity" will match objects with name "my floodlightactivity # activity", "floodlightactivity 2015", or simply "floodlightactivity". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] tag_string # Select only floodlight activities with the specified tag string. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListFloodlightActivitiesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListFloodlightActivitiesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_floodlight_activities(profile_id, advertiser_id: nil, floodlight_activity_group_ids: nil, floodlight_activity_group_name: nil, floodlight_activity_group_tag_string: nil, floodlight_activity_group_type: nil, floodlight_configuration_id: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, tag_string: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/floodlightActivities', options) command.response_representation = Google::Apis::DfareportingV2_5::ListFloodlightActivitiesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListFloodlightActivitiesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['floodlightActivityGroupIds'] = floodlight_activity_group_ids unless floodlight_activity_group_ids.nil? command.query['floodlightActivityGroupName'] = floodlight_activity_group_name unless floodlight_activity_group_name.nil? command.query['floodlightActivityGroupTagString'] = floodlight_activity_group_tag_string unless floodlight_activity_group_tag_string.nil? command.query['floodlightActivityGroupType'] = floodlight_activity_group_type unless floodlight_activity_group_type.nil? command.query['floodlightConfigurationId'] = floodlight_configuration_id unless floodlight_configuration_id.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['tagString'] = tag_string unless tag_string.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing floodlight activity. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Floodlight activity ID. # @param [Google::Apis::DfareportingV2_5::FloodlightActivity] floodlight_activity_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightActivity] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightActivity] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_floodlight_activity(profile_id, id, floodlight_activity_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/floodlightActivities', options) command.request_representation = Google::Apis::DfareportingV2_5::FloodlightActivity::Representation command.request_object = floodlight_activity_object command.response_representation = Google::Apis::DfareportingV2_5::FloodlightActivity::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightActivity command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing floodlight activity. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::FloodlightActivity] floodlight_activity_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightActivity] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightActivity] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_floodlight_activity(profile_id, floodlight_activity_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/floodlightActivities', options) command.request_representation = Google::Apis::DfareportingV2_5::FloodlightActivity::Representation command.request_object = floodlight_activity_object command.response_representation = Google::Apis::DfareportingV2_5::FloodlightActivity::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightActivity command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one floodlight activity group by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Floodlight activity Group ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_floodlight_activity_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/floodlightActivityGroups/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::FloodlightActivityGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightActivityGroup command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new floodlight activity group. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] floodlight_activity_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_floodlight_activity_group(profile_id, floodlight_activity_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/floodlightActivityGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::FloodlightActivityGroup::Representation command.request_object = floodlight_activity_group_object command.response_representation = Google::Apis::DfareportingV2_5::FloodlightActivityGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightActivityGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of floodlight activity groups, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [String] advertiser_id # Select only floodlight activity groups with the specified advertiser ID. Must # specify either advertiserId or floodlightConfigurationId for a non-empty # result. # @param [String] floodlight_configuration_id # Select only floodlight activity groups with the specified floodlight # configuration ID. Must specify either advertiserId, or # floodlightConfigurationId for a non-empty result. # @param [Array<String>, String] ids # Select only floodlight activity groups with the specified IDs. Must specify # either advertiserId or floodlightConfigurationId for a non-empty result. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "floodlightactivitygroup*2015" will return objects with names like " # floodlightactivitygroup June 2015", "floodlightactivitygroup April 2015", or # simply "floodlightactivitygroup 2015". Most of the searches also add wildcards # implicitly at the start and the end of the search string. For example, a # search string of "floodlightactivitygroup" will match objects with name "my # floodlightactivitygroup activity", "floodlightactivitygroup 2015", or simply " # floodlightactivitygroup". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] type # Select only floodlight activity groups with the specified floodlight activity # group type. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListFloodlightActivityGroupsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListFloodlightActivityGroupsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_floodlight_activity_groups(profile_id, advertiser_id: nil, floodlight_configuration_id: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/floodlightActivityGroups', options) command.response_representation = Google::Apis::DfareportingV2_5::ListFloodlightActivityGroupsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListFloodlightActivityGroupsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['floodlightConfigurationId'] = floodlight_configuration_id unless floodlight_configuration_id.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['type'] = type unless type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing floodlight activity group. This method supports patch # semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Floodlight activity Group ID. # @param [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] floodlight_activity_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_floodlight_activity_group(profile_id, id, floodlight_activity_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/floodlightActivityGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::FloodlightActivityGroup::Representation command.request_object = floodlight_activity_group_object command.response_representation = Google::Apis::DfareportingV2_5::FloodlightActivityGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightActivityGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing floodlight activity group. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] floodlight_activity_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightActivityGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_floodlight_activity_group(profile_id, floodlight_activity_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/floodlightActivityGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::FloodlightActivityGroup::Representation command.request_object = floodlight_activity_group_object command.response_representation = Google::Apis::DfareportingV2_5::FloodlightActivityGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightActivityGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one floodlight configuration by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Floodlight configuration ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightConfiguration] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightConfiguration] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_floodlight_configuration(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/floodlightConfigurations/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::FloodlightConfiguration::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightConfiguration command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of floodlight configurations, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] ids # Set of IDs of floodlight configurations to retrieve. Required field; otherwise # an empty list will be returned. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListFloodlightConfigurationsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListFloodlightConfigurationsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_floodlight_configurations(profile_id, ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/floodlightConfigurations', options) command.response_representation = Google::Apis::DfareportingV2_5::ListFloodlightConfigurationsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListFloodlightConfigurationsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['ids'] = ids unless ids.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing floodlight configuration. This method supports patch # semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Floodlight configuration ID. # @param [Google::Apis::DfareportingV2_5::FloodlightConfiguration] floodlight_configuration_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightConfiguration] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightConfiguration] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_floodlight_configuration(profile_id, id, floodlight_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/floodlightConfigurations', options) command.request_representation = Google::Apis::DfareportingV2_5::FloodlightConfiguration::Representation command.request_object = floodlight_configuration_object command.response_representation = Google::Apis::DfareportingV2_5::FloodlightConfiguration::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightConfiguration command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing floodlight configuration. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::FloodlightConfiguration] floodlight_configuration_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FloodlightConfiguration] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FloodlightConfiguration] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_floodlight_configuration(profile_id, floodlight_configuration_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/floodlightConfigurations', options) command.request_representation = Google::Apis::DfareportingV2_5::FloodlightConfiguration::Representation command.request_object = floodlight_configuration_object command.response_representation = Google::Apis::DfareportingV2_5::FloodlightConfiguration::Representation command.response_class = Google::Apis::DfareportingV2_5::FloodlightConfiguration command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one inventory item by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] project_id # Project ID for order documents. # @param [String] id # Inventory item ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::InventoryItem] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::InventoryItem] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_inventory_item(profile_id, project_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/projects/{projectId}/inventoryItems/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::InventoryItem::Representation command.response_class = Google::Apis::DfareportingV2_5::InventoryItem command.params['profileId'] = profile_id unless profile_id.nil? command.params['projectId'] = project_id unless project_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of inventory items, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [String] project_id # Project ID for order documents. # @param [Array<String>, String] ids # Select only inventory items with these IDs. # @param [Boolean] in_plan # Select only inventory items that are in plan. # @param [Fixnum] max_results # Maximum number of results to return. # @param [Array<String>, String] order_id # Select only inventory items that belong to specified orders. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [Array<String>, String] site_id # Select only inventory items that are associated with these sites. # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] type # Select only inventory items with this type. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListInventoryItemsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListInventoryItemsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_inventory_items(profile_id, project_id, ids: nil, in_plan: nil, max_results: nil, order_id: nil, page_token: nil, site_id: nil, sort_field: nil, sort_order: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/projects/{projectId}/inventoryItems', options) command.response_representation = Google::Apis::DfareportingV2_5::ListInventoryItemsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListInventoryItemsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.params['projectId'] = project_id unless project_id.nil? command.query['ids'] = ids unless ids.nil? command.query['inPlan'] = in_plan unless in_plan.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['orderId'] = order_id unless order_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['siteId'] = site_id unless site_id.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['type'] = type unless type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an existing campaign landing page. # @param [String] profile_id # User profile ID associated with this request. # @param [String] campaign_id # Landing page campaign ID. # @param [String] id # Landing page ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_landing_page(profile_id, campaign_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['campaignId'] = campaign_id unless campaign_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one campaign landing page by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] campaign_id # Landing page campaign ID. # @param [String] id # Landing page ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::LandingPage] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::LandingPage] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_landing_page(profile_id, campaign_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::LandingPage::Representation command.response_class = Google::Apis::DfareportingV2_5::LandingPage command.params['profileId'] = profile_id unless profile_id.nil? command.params['campaignId'] = campaign_id unless campaign_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new landing page for the specified campaign. # @param [String] profile_id # User profile ID associated with this request. # @param [String] campaign_id # Landing page campaign ID. # @param [Google::Apis::DfareportingV2_5::LandingPage] landing_page_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::LandingPage] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::LandingPage] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_landing_page(profile_id, campaign_id, landing_page_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages', options) command.request_representation = Google::Apis::DfareportingV2_5::LandingPage::Representation command.request_object = landing_page_object command.response_representation = Google::Apis::DfareportingV2_5::LandingPage::Representation command.response_class = Google::Apis::DfareportingV2_5::LandingPage command.params['profileId'] = profile_id unless profile_id.nil? command.params['campaignId'] = campaign_id unless campaign_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves the list of landing pages for the specified campaign. # @param [String] profile_id # User profile ID associated with this request. # @param [String] campaign_id # Landing page campaign ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListLandingPagesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListLandingPagesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_landing_pages(profile_id, campaign_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages', options) command.response_representation = Google::Apis::DfareportingV2_5::ListLandingPagesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListLandingPagesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.params['campaignId'] = campaign_id unless campaign_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing campaign landing page. This method supports patch # semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] campaign_id # Landing page campaign ID. # @param [String] id # Landing page ID. # @param [Google::Apis::DfareportingV2_5::LandingPage] landing_page_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::LandingPage] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::LandingPage] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_landing_page(profile_id, campaign_id, id, landing_page_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages', options) command.request_representation = Google::Apis::DfareportingV2_5::LandingPage::Representation command.request_object = landing_page_object command.response_representation = Google::Apis::DfareportingV2_5::LandingPage::Representation command.response_class = Google::Apis::DfareportingV2_5::LandingPage command.params['profileId'] = profile_id unless profile_id.nil? command.params['campaignId'] = campaign_id unless campaign_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing campaign landing page. # @param [String] profile_id # User profile ID associated with this request. # @param [String] campaign_id # Landing page campaign ID. # @param [Google::Apis::DfareportingV2_5::LandingPage] landing_page_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::LandingPage] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::LandingPage] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_landing_page(profile_id, campaign_id, landing_page_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/campaigns/{campaignId}/landingPages', options) command.request_representation = Google::Apis::DfareportingV2_5::LandingPage::Representation command.request_object = landing_page_object command.response_representation = Google::Apis::DfareportingV2_5::LandingPage::Representation command.response_class = Google::Apis::DfareportingV2_5::LandingPage command.params['profileId'] = profile_id unless profile_id.nil? command.params['campaignId'] = campaign_id unless campaign_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of metros. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListMetrosResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListMetrosResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_metros(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/metros', options) command.response_representation = Google::Apis::DfareportingV2_5::ListMetrosResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListMetrosResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one mobile carrier by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Mobile carrier ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::MobileCarrier] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::MobileCarrier] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_mobile_carrier(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/mobileCarriers/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::MobileCarrier::Representation command.response_class = Google::Apis::DfareportingV2_5::MobileCarrier command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of mobile carriers. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListMobileCarriersResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListMobileCarriersResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_mobile_carriers(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/mobileCarriers', options) command.response_representation = Google::Apis::DfareportingV2_5::ListMobileCarriersResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListMobileCarriersResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one operating system version by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Operating system version ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::OperatingSystemVersion] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::OperatingSystemVersion] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_operating_system_version(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/operatingSystemVersions/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::OperatingSystemVersion::Representation command.response_class = Google::Apis::DfareportingV2_5::OperatingSystemVersion command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of operating system versions. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListOperatingSystemVersionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListOperatingSystemVersionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_operating_system_versions(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/operatingSystemVersions', options) command.response_representation = Google::Apis::DfareportingV2_5::ListOperatingSystemVersionsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListOperatingSystemVersionsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one operating system by DART ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] dart_id # Operating system DART ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::OperatingSystem] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::OperatingSystem] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_operating_system(profile_id, dart_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/operatingSystems/{dartId}', options) command.response_representation = Google::Apis::DfareportingV2_5::OperatingSystem::Representation command.response_class = Google::Apis::DfareportingV2_5::OperatingSystem command.params['profileId'] = profile_id unless profile_id.nil? command.params['dartId'] = dart_id unless dart_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of operating systems. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListOperatingSystemsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListOperatingSystemsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_operating_systems(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/operatingSystems', options) command.response_representation = Google::Apis::DfareportingV2_5::ListOperatingSystemsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListOperatingSystemsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one order document by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] project_id # Project ID for order documents. # @param [String] id # Order document ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::OrderDocument] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::OrderDocument] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_order_document(profile_id, project_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/projects/{projectId}/orderDocuments/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::OrderDocument::Representation command.response_class = Google::Apis::DfareportingV2_5::OrderDocument command.params['profileId'] = profile_id unless profile_id.nil? command.params['projectId'] = project_id unless project_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of order documents, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [String] project_id # Project ID for order documents. # @param [Boolean] approved # Select only order documents that have been approved by at least one user. # @param [Array<String>, String] ids # Select only order documents with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [Array<String>, String] order_id # Select only order documents for specified orders. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for order documents by name or ID. Wildcards (*) are allowed. # For example, "orderdocument*2015" will return order documents with names like " # orderdocument June 2015", "orderdocument April 2015", or simply "orderdocument # 2015". Most of the searches also add wildcards implicitly at the start and the # end of the search string. For example, a search string of "orderdocument" will # match order documents with name "my orderdocument", "orderdocument 2015", or # simply "orderdocument". # @param [Array<String>, String] site_id # Select only order documents that are associated with these sites. # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListOrderDocumentsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListOrderDocumentsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_order_documents(profile_id, project_id, approved: nil, ids: nil, max_results: nil, order_id: nil, page_token: nil, search_string: nil, site_id: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/projects/{projectId}/orderDocuments', options) command.response_representation = Google::Apis::DfareportingV2_5::ListOrderDocumentsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListOrderDocumentsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.params['projectId'] = project_id unless project_id.nil? command.query['approved'] = approved unless approved.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['orderId'] = order_id unless order_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['siteId'] = site_id unless site_id.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one order by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] project_id # Project ID for orders. # @param [String] id # Order ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Order] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Order] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_order(profile_id, project_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/projects/{projectId}/orders/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Order::Representation command.response_class = Google::Apis::DfareportingV2_5::Order command.params['profileId'] = profile_id unless profile_id.nil? command.params['projectId'] = project_id unless project_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of orders, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [String] project_id # Project ID for orders. # @param [Array<String>, String] ids # Select only orders with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for orders by name or ID. Wildcards (*) are allowed. For # example, "order*2015" will return orders with names like "order June 2015", " # order April 2015", or simply "order 2015". Most of the searches also add # wildcards implicitly at the start and the end of the search string. For # example, a search string of "order" will match orders with name "my order", " # order 2015", or simply "order". # @param [Array<String>, String] site_id # Select only orders that are associated with these site IDs. # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListOrdersResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListOrdersResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_orders(profile_id, project_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, site_id: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/projects/{projectId}/orders', options) command.response_representation = Google::Apis::DfareportingV2_5::ListOrdersResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListOrdersResponse command.params['profileId'] = profile_id unless profile_id.nil? command.params['projectId'] = project_id unless project_id.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['siteId'] = site_id unless site_id.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one placement group by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Placement group ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::PlacementGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::PlacementGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_placement_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/placementGroups/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::PlacementGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::PlacementGroup command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new placement group. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::PlacementGroup] placement_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::PlacementGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::PlacementGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_placement_group(profile_id, placement_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/placementGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::PlacementGroup::Representation command.request_object = placement_group_object command.response_representation = Google::Apis::DfareportingV2_5::PlacementGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::PlacementGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of placement groups, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] advertiser_ids # Select only placement groups that belong to these advertisers. # @param [Boolean] archived # Select only archived placements. Don't set this field to select both archived # and non-archived placements. # @param [Array<String>, String] campaign_ids # Select only placement groups that belong to these campaigns. # @param [Array<String>, String] content_category_ids # Select only placement groups that are associated with these content categories. # @param [Array<String>, String] directory_site_ids # Select only placement groups that are associated with these directory sites. # @param [Array<String>, String] ids # Select only placement groups with these IDs. # @param [String] max_end_date # Select only placements or placement groups whose end date is on or before the # specified maxEndDate. The date should be formatted as "yyyy-MM-dd". # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] max_start_date # Select only placements or placement groups whose start date is on or before # the specified maxStartDate. The date should be formatted as "yyyy-MM-dd". # @param [String] min_end_date # Select only placements or placement groups whose end date is on or after the # specified minEndDate. The date should be formatted as "yyyy-MM-dd". # @param [String] min_start_date # Select only placements or placement groups whose start date is on or after the # specified minStartDate. The date should be formatted as "yyyy-MM-dd". # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] placement_group_type # Select only placement groups belonging with this group type. A package is a # simple group of placements that acts as a single pricing point for a group of # tags. A roadblock is a group of placements that not only acts as a single # pricing point but also assumes that all the tags in it will be served at the # same time. A roadblock requires one of its assigned placements to be marked as # primary for reporting. # @param [Array<String>, String] placement_strategy_ids # Select only placement groups that are associated with these placement # strategies. # @param [Array<String>, String] pricing_types # Select only placement groups with these pricing types. # @param [String] search_string # Allows searching for placement groups by name or ID. Wildcards (*) are allowed. # For example, "placement*2015" will return placement groups with names like " # placement group June 2015", "placement group May 2015", or simply "placements # 2015". Most of the searches also add wildcards implicitly at the start and the # end of the search string. For example, a search string of "placementgroup" # will match placement groups with name "my placementgroup", "placementgroup # 2015", or simply "placementgroup". # @param [Array<String>, String] site_ids # Select only placement groups that are associated with these sites. # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListPlacementGroupsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListPlacementGroupsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_placement_groups(profile_id, advertiser_ids: nil, archived: nil, campaign_ids: nil, content_category_ids: nil, directory_site_ids: nil, ids: nil, max_end_date: nil, max_results: nil, max_start_date: nil, min_end_date: nil, min_start_date: nil, page_token: nil, placement_group_type: nil, placement_strategy_ids: nil, pricing_types: nil, search_string: nil, site_ids: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/placementGroups', options) command.response_representation = Google::Apis::DfareportingV2_5::ListPlacementGroupsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListPlacementGroupsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? command.query['archived'] = archived unless archived.nil? command.query['campaignIds'] = campaign_ids unless campaign_ids.nil? command.query['contentCategoryIds'] = content_category_ids unless content_category_ids.nil? command.query['directorySiteIds'] = directory_site_ids unless directory_site_ids.nil? command.query['ids'] = ids unless ids.nil? command.query['maxEndDate'] = max_end_date unless max_end_date.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['maxStartDate'] = max_start_date unless max_start_date.nil? command.query['minEndDate'] = min_end_date unless min_end_date.nil? command.query['minStartDate'] = min_start_date unless min_start_date.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['placementGroupType'] = placement_group_type unless placement_group_type.nil? command.query['placementStrategyIds'] = placement_strategy_ids unless placement_strategy_ids.nil? command.query['pricingTypes'] = pricing_types unless pricing_types.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['siteIds'] = site_ids unless site_ids.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing placement group. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Placement group ID. # @param [Google::Apis::DfareportingV2_5::PlacementGroup] placement_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::PlacementGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::PlacementGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_placement_group(profile_id, id, placement_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/placementGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::PlacementGroup::Representation command.request_object = placement_group_object command.response_representation = Google::Apis::DfareportingV2_5::PlacementGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::PlacementGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing placement group. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::PlacementGroup] placement_group_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::PlacementGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::PlacementGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_placement_group(profile_id, placement_group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/placementGroups', options) command.request_representation = Google::Apis::DfareportingV2_5::PlacementGroup::Representation command.request_object = placement_group_object command.response_representation = Google::Apis::DfareportingV2_5::PlacementGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::PlacementGroup command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an existing placement strategy. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Placement strategy ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_placement_strategy(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/placementStrategies/{id}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one placement strategy by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Placement strategy ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::PlacementStrategy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::PlacementStrategy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_placement_strategy(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/placementStrategies/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::PlacementStrategy::Representation command.response_class = Google::Apis::DfareportingV2_5::PlacementStrategy command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new placement strategy. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::PlacementStrategy] placement_strategy_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::PlacementStrategy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::PlacementStrategy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_placement_strategy(profile_id, placement_strategy_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/placementStrategies', options) command.request_representation = Google::Apis::DfareportingV2_5::PlacementStrategy::Representation command.request_object = placement_strategy_object command.response_representation = Google::Apis::DfareportingV2_5::PlacementStrategy::Representation command.response_class = Google::Apis::DfareportingV2_5::PlacementStrategy command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of placement strategies, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] ids # Select only placement strategies with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "placementstrategy*2015" will return objects with names like " # placementstrategy June 2015", "placementstrategy April 2015", or simply " # placementstrategy 2015". Most of the searches also add wildcards implicitly at # the start and the end of the search string. For example, a search string of " # placementstrategy" will match objects with name "my placementstrategy", " # placementstrategy 2015", or simply "placementstrategy". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListPlacementStrategiesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListPlacementStrategiesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_placement_strategies(profile_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/placementStrategies', options) command.response_representation = Google::Apis::DfareportingV2_5::ListPlacementStrategiesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListPlacementStrategiesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing placement strategy. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Placement strategy ID. # @param [Google::Apis::DfareportingV2_5::PlacementStrategy] placement_strategy_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::PlacementStrategy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::PlacementStrategy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_placement_strategy(profile_id, id, placement_strategy_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/placementStrategies', options) command.request_representation = Google::Apis::DfareportingV2_5::PlacementStrategy::Representation command.request_object = placement_strategy_object command.response_representation = Google::Apis::DfareportingV2_5::PlacementStrategy::Representation command.response_class = Google::Apis::DfareportingV2_5::PlacementStrategy command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing placement strategy. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::PlacementStrategy] placement_strategy_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::PlacementStrategy] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::PlacementStrategy] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_placement_strategy(profile_id, placement_strategy_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/placementStrategies', options) command.request_representation = Google::Apis::DfareportingV2_5::PlacementStrategy::Representation command.request_object = placement_strategy_object command.response_representation = Google::Apis::DfareportingV2_5::PlacementStrategy::Representation command.response_class = Google::Apis::DfareportingV2_5::PlacementStrategy command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Generates tags for a placement. # @param [String] profile_id # User profile ID associated with this request. # @param [String] campaign_id # Generate placements belonging to this campaign. This is a required field. # @param [Array<String>, String] placement_ids # Generate tags for these placements. # @param [Array<String>, String] tag_formats # Tag formats to generate for these placements. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::GeneratePlacementsTagsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::GeneratePlacementsTagsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def generate_placement_tags(profile_id, campaign_id: nil, placement_ids: nil, tag_formats: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/placements/generatetags', options) command.response_representation = Google::Apis::DfareportingV2_5::GeneratePlacementsTagsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::GeneratePlacementsTagsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['campaignId'] = campaign_id unless campaign_id.nil? command.query['placementIds'] = placement_ids unless placement_ids.nil? command.query['tagFormats'] = tag_formats unless tag_formats.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one placement by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Placement ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Placement] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Placement] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_placement(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/placements/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Placement::Representation command.response_class = Google::Apis::DfareportingV2_5::Placement command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new placement. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Placement] placement_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Placement] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Placement] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_placement(profile_id, placement_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/placements', options) command.request_representation = Google::Apis::DfareportingV2_5::Placement::Representation command.request_object = placement_object command.response_representation = Google::Apis::DfareportingV2_5::Placement::Representation command.response_class = Google::Apis::DfareportingV2_5::Placement command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of placements, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] advertiser_ids # Select only placements that belong to these advertisers. # @param [Boolean] archived # Select only archived placements. Don't set this field to select both archived # and non-archived placements. # @param [Array<String>, String] campaign_ids # Select only placements that belong to these campaigns. # @param [Array<String>, String] compatibilities # Select only placements that are associated with these compatibilities. DISPLAY # and DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile # devices for regular or interstitial ads respectively. APP and APP_INTERSTITIAL # are for rendering in mobile apps. IN_STREAM_VIDEO refers to rendering in in- # stream video ads developed with the VAST standard. # @param [Array<String>, String] content_category_ids # Select only placements that are associated with these content categories. # @param [Array<String>, String] directory_site_ids # Select only placements that are associated with these directory sites. # @param [Array<String>, String] group_ids # Select only placements that belong to these placement groups. # @param [Array<String>, String] ids # Select only placements with these IDs. # @param [String] max_end_date # Select only placements or placement groups whose end date is on or before the # specified maxEndDate. The date should be formatted as "yyyy-MM-dd". # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] max_start_date # Select only placements or placement groups whose start date is on or before # the specified maxStartDate. The date should be formatted as "yyyy-MM-dd". # @param [String] min_end_date # Select only placements or placement groups whose end date is on or after the # specified minEndDate. The date should be formatted as "yyyy-MM-dd". # @param [String] min_start_date # Select only placements or placement groups whose start date is on or after the # specified minStartDate. The date should be formatted as "yyyy-MM-dd". # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] payment_source # Select only placements with this payment source. # @param [Array<String>, String] placement_strategy_ids # Select only placements that are associated with these placement strategies. # @param [Array<String>, String] pricing_types # Select only placements with these pricing types. # @param [String] search_string # Allows searching for placements by name or ID. Wildcards (*) are allowed. For # example, "placement*2015" will return placements with names like "placement # June 2015", "placement May 2015", or simply "placements 2015". Most of the # searches also add wildcards implicitly at the start and the end of the search # string. For example, a search string of "placement" will match placements with # name "my placement", "placement 2015", or simply "placement". # @param [Array<String>, String] site_ids # Select only placements that are associated with these sites. # @param [Array<String>, String] size_ids # Select only placements that are associated with these sizes. # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListPlacementsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListPlacementsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_placements(profile_id, advertiser_ids: nil, archived: nil, campaign_ids: nil, compatibilities: nil, content_category_ids: nil, directory_site_ids: nil, group_ids: nil, ids: nil, max_end_date: nil, max_results: nil, max_start_date: nil, min_end_date: nil, min_start_date: nil, page_token: nil, payment_source: nil, placement_strategy_ids: nil, pricing_types: nil, search_string: nil, site_ids: nil, size_ids: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/placements', options) command.response_representation = Google::Apis::DfareportingV2_5::ListPlacementsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListPlacementsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? command.query['archived'] = archived unless archived.nil? command.query['campaignIds'] = campaign_ids unless campaign_ids.nil? command.query['compatibilities'] = compatibilities unless compatibilities.nil? command.query['contentCategoryIds'] = content_category_ids unless content_category_ids.nil? command.query['directorySiteIds'] = directory_site_ids unless directory_site_ids.nil? command.query['groupIds'] = group_ids unless group_ids.nil? command.query['ids'] = ids unless ids.nil? command.query['maxEndDate'] = max_end_date unless max_end_date.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['maxStartDate'] = max_start_date unless max_start_date.nil? command.query['minEndDate'] = min_end_date unless min_end_date.nil? command.query['minStartDate'] = min_start_date unless min_start_date.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['paymentSource'] = payment_source unless payment_source.nil? command.query['placementStrategyIds'] = placement_strategy_ids unless placement_strategy_ids.nil? command.query['pricingTypes'] = pricing_types unless pricing_types.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['siteIds'] = site_ids unless site_ids.nil? command.query['sizeIds'] = size_ids unless size_ids.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing placement. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Placement ID. # @param [Google::Apis::DfareportingV2_5::Placement] placement_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Placement] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Placement] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_placement(profile_id, id, placement_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/placements', options) command.request_representation = Google::Apis::DfareportingV2_5::Placement::Representation command.request_object = placement_object command.response_representation = Google::Apis::DfareportingV2_5::Placement::Representation command.response_class = Google::Apis::DfareportingV2_5::Placement command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing placement. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Placement] placement_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Placement] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Placement] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_placement(profile_id, placement_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/placements', options) command.request_representation = Google::Apis::DfareportingV2_5::Placement::Representation command.request_object = placement_object command.response_representation = Google::Apis::DfareportingV2_5::Placement::Representation command.response_class = Google::Apis::DfareportingV2_5::Placement command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one platform type by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Platform type ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::PlatformType] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::PlatformType] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_platform_type(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/platformTypes/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::PlatformType::Representation command.response_class = Google::Apis::DfareportingV2_5::PlatformType command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of platform types. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListPlatformTypesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListPlatformTypesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_platform_types(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/platformTypes', options) command.response_representation = Google::Apis::DfareportingV2_5::ListPlatformTypesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListPlatformTypesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one postal code by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] code # Postal code ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::PostalCode] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::PostalCode] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_postal_code(profile_id, code, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/postalCodes/{code}', options) command.response_representation = Google::Apis::DfareportingV2_5::PostalCode::Representation command.response_class = Google::Apis::DfareportingV2_5::PostalCode command.params['profileId'] = profile_id unless profile_id.nil? command.params['code'] = code unless code.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of postal codes. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListPostalCodesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListPostalCodesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_postal_codes(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/postalCodes', options) command.response_representation = Google::Apis::DfareportingV2_5::ListPostalCodesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListPostalCodesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one project by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Project ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Project] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Project] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_project(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/projects/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Project::Representation command.response_class = Google::Apis::DfareportingV2_5::Project command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of projects, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] advertiser_ids # Select only projects with these advertiser IDs. # @param [Array<String>, String] ids # Select only projects with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for projects by name or ID. Wildcards (*) are allowed. For # example, "project*2015" will return projects with names like "project June # 2015", "project April 2015", or simply "project 2015". Most of the searches # also add wildcards implicitly at the start and the end of the search string. # For example, a search string of "project" will match projects with name "my # project", "project 2015", or simply "project". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListProjectsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListProjectsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_projects(profile_id, advertiser_ids: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/projects', options) command.response_representation = Google::Apis::DfareportingV2_5::ListProjectsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListProjectsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['advertiserIds'] = advertiser_ids unless advertiser_ids.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of regions. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListRegionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListRegionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_regions(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/regions', options) command.response_representation = Google::Apis::DfareportingV2_5::ListRegionsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListRegionsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one remarketing list share by remarketing list ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] remarketing_list_id # Remarketing list ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::RemarketingListShare] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::RemarketingListShare] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_remarketing_list_share(profile_id, remarketing_list_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/remarketingListShares/{remarketingListId}', options) command.response_representation = Google::Apis::DfareportingV2_5::RemarketingListShare::Representation command.response_class = Google::Apis::DfareportingV2_5::RemarketingListShare command.params['profileId'] = profile_id unless profile_id.nil? command.params['remarketingListId'] = remarketing_list_id unless remarketing_list_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing remarketing list share. This method supports patch # semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] remarketing_list_id # Remarketing list ID. # @param [Google::Apis::DfareportingV2_5::RemarketingListShare] remarketing_list_share_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::RemarketingListShare] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::RemarketingListShare] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_remarketing_list_share(profile_id, remarketing_list_id, remarketing_list_share_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/remarketingListShares', options) command.request_representation = Google::Apis::DfareportingV2_5::RemarketingListShare::Representation command.request_object = remarketing_list_share_object command.response_representation = Google::Apis::DfareportingV2_5::RemarketingListShare::Representation command.response_class = Google::Apis::DfareportingV2_5::RemarketingListShare command.params['profileId'] = profile_id unless profile_id.nil? command.query['remarketingListId'] = remarketing_list_id unless remarketing_list_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing remarketing list share. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::RemarketingListShare] remarketing_list_share_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::RemarketingListShare] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::RemarketingListShare] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_remarketing_list_share(profile_id, remarketing_list_share_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/remarketingListShares', options) command.request_representation = Google::Apis::DfareportingV2_5::RemarketingListShare::Representation command.request_object = remarketing_list_share_object command.response_representation = Google::Apis::DfareportingV2_5::RemarketingListShare::Representation command.response_class = Google::Apis::DfareportingV2_5::RemarketingListShare command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one remarketing list by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Remarketing list ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::RemarketingList] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::RemarketingList] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_remarketing_list(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/remarketingLists/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::RemarketingList::Representation command.response_class = Google::Apis::DfareportingV2_5::RemarketingList command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new remarketing list. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::RemarketingList] remarketing_list_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::RemarketingList] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::RemarketingList] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_remarketing_list(profile_id, remarketing_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/remarketingLists', options) command.request_representation = Google::Apis::DfareportingV2_5::RemarketingList::Representation command.request_object = remarketing_list_object command.response_representation = Google::Apis::DfareportingV2_5::RemarketingList::Representation command.response_class = Google::Apis::DfareportingV2_5::RemarketingList command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of remarketing lists, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [String] advertiser_id # Select only remarketing lists owned by this advertiser. # @param [Boolean] active # Select only active or only inactive remarketing lists. # @param [String] floodlight_activity_id # Select only remarketing lists that have this floodlight activity ID. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] name # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "remarketing list*2015" will return objects with names like " # remarketing list June 2015", "remarketing list April 2015", or simply " # remarketing list 2015". Most of the searches also add wildcards implicitly at # the start and the end of the search string. For example, a search string of " # remarketing list" will match objects with name "my remarketing list", " # remarketing list 2015", or simply "remarketing list". # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListRemarketingListsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListRemarketingListsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_remarketing_lists(profile_id, advertiser_id, active: nil, floodlight_activity_id: nil, max_results: nil, name: nil, page_token: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/remarketingLists', options) command.response_representation = Google::Apis::DfareportingV2_5::ListRemarketingListsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListRemarketingListsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['active'] = active unless active.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['floodlightActivityId'] = floodlight_activity_id unless floodlight_activity_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['name'] = name unless name.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing remarketing list. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Remarketing list ID. # @param [Google::Apis::DfareportingV2_5::RemarketingList] remarketing_list_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::RemarketingList] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::RemarketingList] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_remarketing_list(profile_id, id, remarketing_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/remarketingLists', options) command.request_representation = Google::Apis::DfareportingV2_5::RemarketingList::Representation command.request_object = remarketing_list_object command.response_representation = Google::Apis::DfareportingV2_5::RemarketingList::Representation command.response_class = Google::Apis::DfareportingV2_5::RemarketingList command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing remarketing list. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::RemarketingList] remarketing_list_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::RemarketingList] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::RemarketingList] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_remarketing_list(profile_id, remarketing_list_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/remarketingLists', options) command.request_representation = Google::Apis::DfareportingV2_5::RemarketingList::Representation command.request_object = remarketing_list_object command.response_representation = Google::Apis::DfareportingV2_5::RemarketingList::Representation command.response_class = Google::Apis::DfareportingV2_5::RemarketingList command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes a report by its ID. # @param [String] profile_id # The DFA user profile ID. # @param [String] report_id # The ID of the report. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_report(profile_id, report_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/reports/{reportId}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['reportId'] = report_id unless report_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a report by its ID. # @param [String] profile_id # The DFA user profile ID. # @param [String] report_id # The ID of the report. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Report] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Report] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_report(profile_id, report_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/reports/{reportId}', options) command.response_representation = Google::Apis::DfareportingV2_5::Report::Representation command.response_class = Google::Apis::DfareportingV2_5::Report command.params['profileId'] = profile_id unless profile_id.nil? command.params['reportId'] = report_id unless report_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Creates a report. # @param [String] profile_id # The DFA user profile ID. # @param [Google::Apis::DfareportingV2_5::Report] report_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Report] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Report] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_report(profile_id, report_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/reports', options) command.request_representation = Google::Apis::DfareportingV2_5::Report::Representation command.request_object = report_object command.response_representation = Google::Apis::DfareportingV2_5::Report::Representation command.response_class = Google::Apis::DfareportingV2_5::Report command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves list of reports. # @param [String] profile_id # The DFA user profile ID. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # The value of the nextToken from the previous result page. # @param [String] scope # The scope that defines which results are returned, default is 'MINE'. # @param [String] sort_field # The field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is 'DESCENDING'. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ReportList] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ReportList] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_reports(profile_id, max_results: nil, page_token: nil, scope: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/reports', options) command.response_representation = Google::Apis::DfareportingV2_5::ReportList::Representation command.response_class = Google::Apis::DfareportingV2_5::ReportList command.params['profileId'] = profile_id unless profile_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['scope'] = scope unless scope.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates a report. This method supports patch semantics. # @param [String] profile_id # The DFA user profile ID. # @param [String] report_id # The ID of the report. # @param [Google::Apis::DfareportingV2_5::Report] report_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Report] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Report] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_report(profile_id, report_id, report_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/reports/{reportId}', options) command.request_representation = Google::Apis::DfareportingV2_5::Report::Representation command.request_object = report_object command.response_representation = Google::Apis::DfareportingV2_5::Report::Representation command.response_class = Google::Apis::DfareportingV2_5::Report command.params['profileId'] = profile_id unless profile_id.nil? command.params['reportId'] = report_id unless report_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Runs a report. # @param [String] profile_id # The DFA profile ID. # @param [String] report_id # The ID of the report. # @param [Boolean] synchronous # If set and true, tries to run the report synchronously. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::File] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::File] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def run_report(profile_id, report_id, synchronous: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/reports/{reportId}/run', options) command.response_representation = Google::Apis::DfareportingV2_5::File::Representation command.response_class = Google::Apis::DfareportingV2_5::File command.params['profileId'] = profile_id unless profile_id.nil? command.params['reportId'] = report_id unless report_id.nil? command.query['synchronous'] = synchronous unless synchronous.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates a report. # @param [String] profile_id # The DFA user profile ID. # @param [String] report_id # The ID of the report. # @param [Google::Apis::DfareportingV2_5::Report] report_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Report] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Report] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_report(profile_id, report_id, report_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/reports/{reportId}', options) command.request_representation = Google::Apis::DfareportingV2_5::Report::Representation command.request_object = report_object command.response_representation = Google::Apis::DfareportingV2_5::Report::Representation command.response_class = Google::Apis::DfareportingV2_5::Report command.params['profileId'] = profile_id unless profile_id.nil? command.params['reportId'] = report_id unless report_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Returns the fields that are compatible to be selected in the respective # sections of a report criteria, given the fields already selected in the input # report and user permissions. # @param [String] profile_id # The DFA user profile ID. # @param [Google::Apis::DfareportingV2_5::Report] report_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::CompatibleFields] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::CompatibleFields] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def query_report_compatible_field(profile_id, report_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/reports/compatiblefields/query', options) command.request_representation = Google::Apis::DfareportingV2_5::Report::Representation command.request_object = report_object command.response_representation = Google::Apis::DfareportingV2_5::CompatibleFields::Representation command.response_class = Google::Apis::DfareportingV2_5::CompatibleFields command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a report file. # @param [String] profile_id # The DFA profile ID. # @param [String] report_id # The ID of the report. # @param [String] file_id # The ID of the report file. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [IO, String] download_dest # IO stream or filename to receive content download # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::File] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::File] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_report_file(profile_id, report_id, file_id, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'userprofiles/{profileId}/reports/{reportId}/files/{fileId}', options) else command = make_download_command(:get, 'userprofiles/{profileId}/reports/{reportId}/files/{fileId}', options) command.download_dest = download_dest end command.response_representation = Google::Apis::DfareportingV2_5::File::Representation command.response_class = Google::Apis::DfareportingV2_5::File command.params['profileId'] = profile_id unless profile_id.nil? command.params['reportId'] = report_id unless report_id.nil? command.params['fileId'] = file_id unless file_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Lists files for a report. # @param [String] profile_id # The DFA profile ID. # @param [String] report_id # The ID of the parent report. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # The value of the nextToken from the previous result page. # @param [String] sort_field # The field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is 'DESCENDING'. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::FileList] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::FileList] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_report_files(profile_id, report_id, max_results: nil, page_token: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/reports/{reportId}/files', options) command.response_representation = Google::Apis::DfareportingV2_5::FileList::Representation command.response_class = Google::Apis::DfareportingV2_5::FileList command.params['profileId'] = profile_id unless profile_id.nil? command.params['reportId'] = report_id unless report_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one site by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Site ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Site] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Site] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_site(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/sites/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Site::Representation command.response_class = Google::Apis::DfareportingV2_5::Site command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new site. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Site] site_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Site] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Site] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_site(profile_id, site_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/sites', options) command.request_representation = Google::Apis::DfareportingV2_5::Site::Representation command.request_object = site_object command.response_representation = Google::Apis::DfareportingV2_5::Site::Representation command.response_class = Google::Apis::DfareportingV2_5::Site command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of sites, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Boolean] accepts_in_stream_video_placements # This search filter is no longer supported and will have no effect on the # results returned. # @param [Boolean] accepts_interstitial_placements # This search filter is no longer supported and will have no effect on the # results returned. # @param [Boolean] accepts_publisher_paid_placements # Select only sites that accept publisher paid placements. # @param [Boolean] ad_words_site # Select only AdWords sites. # @param [Boolean] approved # Select only approved sites. # @param [Array<String>, String] campaign_ids # Select only sites with these campaign IDs. # @param [Array<String>, String] directory_site_ids # Select only sites with these directory site IDs. # @param [Array<String>, String] ids # Select only sites with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name, ID or keyName. Wildcards (*) are allowed. # For example, "site*2015" will return objects with names like "site June 2015", # "site April 2015", or simply "site 2015". Most of the searches also add # wildcards implicitly at the start and the end of the search string. For # example, a search string of "site" will match objects with name "my site", " # site 2015", or simply "site". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] subaccount_id # Select only sites with this subaccount ID. # @param [Boolean] unmapped_site # Select only sites that have not been mapped to a directory site. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListSitesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListSitesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_sites(profile_id, accepts_in_stream_video_placements: nil, accepts_interstitial_placements: nil, accepts_publisher_paid_placements: nil, ad_words_site: nil, approved: nil, campaign_ids: nil, directory_site_ids: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, subaccount_id: nil, unmapped_site: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/sites', options) command.response_representation = Google::Apis::DfareportingV2_5::ListSitesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListSitesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['acceptsInStreamVideoPlacements'] = accepts_in_stream_video_placements unless accepts_in_stream_video_placements.nil? command.query['acceptsInterstitialPlacements'] = accepts_interstitial_placements unless accepts_interstitial_placements.nil? command.query['acceptsPublisherPaidPlacements'] = accepts_publisher_paid_placements unless accepts_publisher_paid_placements.nil? command.query['adWordsSite'] = ad_words_site unless ad_words_site.nil? command.query['approved'] = approved unless approved.nil? command.query['campaignIds'] = campaign_ids unless campaign_ids.nil? command.query['directorySiteIds'] = directory_site_ids unless directory_site_ids.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['subaccountId'] = subaccount_id unless subaccount_id.nil? command.query['unmappedSite'] = unmapped_site unless unmapped_site.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing site. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Site ID. # @param [Google::Apis::DfareportingV2_5::Site] site_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Site] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Site] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_site(profile_id, id, site_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/sites', options) command.request_representation = Google::Apis::DfareportingV2_5::Site::Representation command.request_object = site_object command.response_representation = Google::Apis::DfareportingV2_5::Site::Representation command.response_class = Google::Apis::DfareportingV2_5::Site command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing site. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Site] site_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Site] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Site] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_site(profile_id, site_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/sites', options) command.request_representation = Google::Apis::DfareportingV2_5::Site::Representation command.request_object = site_object command.response_representation = Google::Apis::DfareportingV2_5::Site::Representation command.response_class = Google::Apis::DfareportingV2_5::Site command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one size by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Size ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Size] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Size] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_size(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/sizes/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Size::Representation command.response_class = Google::Apis::DfareportingV2_5::Size command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new size. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Size] size_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Size] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Size] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_size(profile_id, size_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/sizes', options) command.request_representation = Google::Apis::DfareportingV2_5::Size::Representation command.request_object = size_object command.response_representation = Google::Apis::DfareportingV2_5::Size::Representation command.response_class = Google::Apis::DfareportingV2_5::Size command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of sizes, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Fixnum] height # Select only sizes with this height. # @param [Boolean] iab_standard # Select only IAB standard sizes. # @param [Array<String>, String] ids # Select only sizes with these IDs. # @param [Fixnum] width # Select only sizes with this width. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListSizesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListSizesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_sizes(profile_id, height: nil, iab_standard: nil, ids: nil, width: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/sizes', options) command.response_representation = Google::Apis::DfareportingV2_5::ListSizesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListSizesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['height'] = height unless height.nil? command.query['iabStandard'] = iab_standard unless iab_standard.nil? command.query['ids'] = ids unless ids.nil? command.query['width'] = width unless width.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one subaccount by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Subaccount ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Subaccount] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Subaccount] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_subaccount(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/subaccounts/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::Subaccount::Representation command.response_class = Google::Apis::DfareportingV2_5::Subaccount command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new subaccount. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Subaccount] subaccount_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Subaccount] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Subaccount] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_subaccount(profile_id, subaccount_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/subaccounts', options) command.request_representation = Google::Apis::DfareportingV2_5::Subaccount::Representation command.request_object = subaccount_object command.response_representation = Google::Apis::DfareportingV2_5::Subaccount::Representation command.response_class = Google::Apis::DfareportingV2_5::Subaccount command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets a list of subaccounts, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] ids # Select only subaccounts with these IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "subaccount*2015" will return objects with names like "subaccount # June 2015", "subaccount April 2015", or simply "subaccount 2015". Most of the # searches also add wildcards implicitly at the start and the end of the search # string. For example, a search string of "subaccount" will match objects with # name "my subaccount", "subaccount 2015", or simply "subaccount". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListSubaccountsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListSubaccountsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_subaccounts(profile_id, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/subaccounts', options) command.response_representation = Google::Apis::DfareportingV2_5::ListSubaccountsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListSubaccountsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing subaccount. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Subaccount ID. # @param [Google::Apis::DfareportingV2_5::Subaccount] subaccount_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Subaccount] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Subaccount] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_subaccount(profile_id, id, subaccount_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/subaccounts', options) command.request_representation = Google::Apis::DfareportingV2_5::Subaccount::Representation command.request_object = subaccount_object command.response_representation = Google::Apis::DfareportingV2_5::Subaccount::Representation command.response_class = Google::Apis::DfareportingV2_5::Subaccount command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing subaccount. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::Subaccount] subaccount_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::Subaccount] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::Subaccount] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_subaccount(profile_id, subaccount_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/subaccounts', options) command.request_representation = Google::Apis::DfareportingV2_5::Subaccount::Representation command.request_object = subaccount_object command.response_representation = Google::Apis::DfareportingV2_5::Subaccount::Representation command.response_class = Google::Apis::DfareportingV2_5::Subaccount command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one remarketing list by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # Remarketing list ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::TargetableRemarketingList] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::TargetableRemarketingList] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_targetable_remarketing_list(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/targetableRemarketingLists/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::TargetableRemarketingList::Representation command.response_class = Google::Apis::DfareportingV2_5::TargetableRemarketingList command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of targetable remarketing lists, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [String] advertiser_id # Select only targetable remarketing lists targetable by these advertisers. # @param [Boolean] active # Select only active or only inactive targetable remarketing lists. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] name # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "remarketing list*2015" will return objects with names like " # remarketing list June 2015", "remarketing list April 2015", or simply " # remarketing list 2015". Most of the searches also add wildcards implicitly at # the start and the end of the search string. For example, a search string of " # remarketing list" will match objects with name "my remarketing list", " # remarketing list 2015", or simply "remarketing list". # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListTargetableRemarketingListsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListTargetableRemarketingListsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_targetable_remarketing_lists(profile_id, advertiser_id, active: nil, max_results: nil, name: nil, page_token: nil, sort_field: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/targetableRemarketingLists', options) command.response_representation = Google::Apis::DfareportingV2_5::ListTargetableRemarketingListsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListTargetableRemarketingListsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['active'] = active unless active.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['name'] = name unless name.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one user profile by ID. # @param [String] profile_id # The user profile ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::UserProfile] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::UserProfile] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_user_profile(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}', options) command.response_representation = Google::Apis::DfareportingV2_5::UserProfile::Representation command.response_class = Google::Apis::DfareportingV2_5::UserProfile command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves list of user profiles for a user. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::UserProfileList] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::UserProfileList] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_user_profiles(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles', options) command.response_representation = Google::Apis::DfareportingV2_5::UserProfileList::Representation command.response_class = Google::Apis::DfareportingV2_5::UserProfileList command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one user role permission group by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # User role permission group ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::UserRolePermissionGroup] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::UserRolePermissionGroup] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_user_role_permission_group(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/userRolePermissionGroups/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::UserRolePermissionGroup::Representation command.response_class = Google::Apis::DfareportingV2_5::UserRolePermissionGroup command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets a list of all supported user role permission groups. # @param [String] profile_id # User profile ID associated with this request. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListUserRolePermissionGroupsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListUserRolePermissionGroupsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_user_role_permission_groups(profile_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/userRolePermissionGroups', options) command.response_representation = Google::Apis::DfareportingV2_5::ListUserRolePermissionGroupsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListUserRolePermissionGroupsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one user role permission by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # User role permission ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::UserRolePermission] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::UserRolePermission] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_user_role_permission(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/userRolePermissions/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::UserRolePermission::Representation command.response_class = Google::Apis::DfareportingV2_5::UserRolePermission command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets a list of user role permissions, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Array<String>, String] ids # Select only user role permissions with these IDs. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListUserRolePermissionsResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListUserRolePermissionsResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_user_role_permissions(profile_id, ids: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/userRolePermissions', options) command.response_representation = Google::Apis::DfareportingV2_5::ListUserRolePermissionsResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListUserRolePermissionsResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['ids'] = ids unless ids.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Deletes an existing user role. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # User role ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [NilClass] No result returned for this method # @yieldparam err [StandardError] error object if request failed # # @return [void] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def delete_user_role(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'userprofiles/{profileId}/userRoles/{id}', options) command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Gets one user role by ID. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # User role ID. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::UserRole] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::UserRole] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def get_user_role(profile_id, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/userRoles/{id}', options) command.response_representation = Google::Apis::DfareportingV2_5::UserRole::Representation command.response_class = Google::Apis::DfareportingV2_5::UserRole command.params['profileId'] = profile_id unless profile_id.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Inserts a new user role. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::UserRole] user_role_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::UserRole] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::UserRole] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def insert_user_role(profile_id, user_role_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'userprofiles/{profileId}/userRoles', options) command.request_representation = Google::Apis::DfareportingV2_5::UserRole::Representation command.request_object = user_role_object command.response_representation = Google::Apis::DfareportingV2_5::UserRole::Representation command.response_class = Google::Apis::DfareportingV2_5::UserRole command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Retrieves a list of user roles, possibly filtered. # @param [String] profile_id # User profile ID associated with this request. # @param [Boolean] account_user_role_only # Select only account level user roles not associated with any specific # subaccount. # @param [Array<String>, String] ids # Select only user roles with the specified IDs. # @param [Fixnum] max_results # Maximum number of results to return. # @param [String] page_token # Value of the nextPageToken from the previous result page. # @param [String] search_string # Allows searching for objects by name or ID. Wildcards (*) are allowed. For # example, "userrole*2015" will return objects with names like "userrole June # 2015", "userrole April 2015", or simply "userrole 2015". Most of the searches # also add wildcards implicitly at the start and the end of the search string. # For example, a search string of "userrole" will match objects with name "my # userrole", "userrole 2015", or simply "userrole". # @param [String] sort_field # Field by which to sort the list. # @param [String] sort_order # Order of sorted results, default is ASCENDING. # @param [String] subaccount_id # Select only user roles that belong to this subaccount. # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::ListUserRolesResponse] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::ListUserRolesResponse] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def list_user_roles(profile_id, account_user_role_only: nil, ids: nil, max_results: nil, page_token: nil, search_string: nil, sort_field: nil, sort_order: nil, subaccount_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'userprofiles/{profileId}/userRoles', options) command.response_representation = Google::Apis::DfareportingV2_5::ListUserRolesResponse::Representation command.response_class = Google::Apis::DfareportingV2_5::ListUserRolesResponse command.params['profileId'] = profile_id unless profile_id.nil? command.query['accountUserRoleOnly'] = account_user_role_only unless account_user_role_only.nil? command.query['ids'] = ids unless ids.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['searchString'] = search_string unless search_string.nil? command.query['sortField'] = sort_field unless sort_field.nil? command.query['sortOrder'] = sort_order unless sort_order.nil? command.query['subaccountId'] = subaccount_id unless subaccount_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing user role. This method supports patch semantics. # @param [String] profile_id # User profile ID associated with this request. # @param [String] id # User role ID. # @param [Google::Apis::DfareportingV2_5::UserRole] user_role_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::UserRole] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::UserRole] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def patch_user_role(profile_id, id, user_role_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'userprofiles/{profileId}/userRoles', options) command.request_representation = Google::Apis::DfareportingV2_5::UserRole::Representation command.request_object = user_role_object command.response_representation = Google::Apis::DfareportingV2_5::UserRole::Representation command.response_class = Google::Apis::DfareportingV2_5::UserRole command.params['profileId'] = profile_id unless profile_id.nil? command.query['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end # Updates an existing user role. # @param [String] profile_id # User profile ID associated with this request. # @param [Google::Apis::DfareportingV2_5::UserRole] user_role_object # @param [String] fields # Selector specifying which fields to include in a partial response. # @param [String] quota_user # Available to use for quota purposes for server-side applications. Can be any # arbitrary string assigned to a user, but should not exceed 40 characters. # Overrides userIp if both are provided. # @param [String] user_ip # IP address of the site where the request originates. Use this if you want to # enforce per-user limits. # @param [Google::Apis::RequestOptions] options # Request-specific options # # @yield [result, err] Result & error if block supplied # @yieldparam result [Google::Apis::DfareportingV2_5::UserRole] parsed result object # @yieldparam err [StandardError] error object if request failed # # @return [Google::Apis::DfareportingV2_5::UserRole] # # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification # @raise [Google::Apis::AuthorizationError] Authorization is required def update_user_role(profile_id, user_role_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'userprofiles/{profileId}/userRoles', options) command.request_representation = Google::Apis::DfareportingV2_5::UserRole::Representation command.request_object = user_role_object command.response_representation = Google::Apis::DfareportingV2_5::UserRole::Representation command.response_class = Google::Apis::DfareportingV2_5::UserRole command.params['profileId'] = profile_id unless profile_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end protected def apply_command_defaults(command) command.query['key'] = key unless key.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? end end end end end
{ "content_hash": "0ebd4113308e972c80ac14f88f723ca8", "timestamp": "", "source": "github", "line_count": 8741, "max_line_length": 589, "avg_line_length": 62.86214391946002, "alnum_prop": 0.6599099508988531, "repo_name": "saicheems/discovery-artifact-manager", "id": "695a0f95d0e01897989c04e81693355813690fc9", "size": "550055", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "clients/ruby/google-api-ruby-client/generated/google/apis/dfareporting_v2_5/service.rb", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Go", "bytes": "277879" }, { "name": "Groovy", "bytes": "1910" }, { "name": "HTML", "bytes": "4334" }, { "name": "Java", "bytes": "1957433" }, { "name": "JavaScript", "bytes": "11972945" }, { "name": "PHP", "bytes": "10937730" }, { "name": "Protocol Buffer", "bytes": "53370" }, { "name": "Python", "bytes": "585050" }, { "name": "Ruby", "bytes": "24477192" }, { "name": "Shell", "bytes": "7151" } ], "symlink_target": "" }
FROM php:5.6-fpm ENV LOCAL_UID 33 ENV NODEREPO node_8.x # Install dependencies # apt-get update is called during the nodejs install script # See https://deb.nodesource.com/setup RUN set -xe \ \ # Add nodejs repo (jessie is coming from php) and deps to it && apt-get update && apt-get install -y --force-yes apt-transport-https --no-install-recommends \ && php -r "echo file_get_contents('https://deb.nodesource.com/gpgkey/nodesource.gpg.key');" | apt-key add - \ && echo "deb https://deb.nodesource.com/${NODEREPO} jessie main" > /etc/apt/sources.list.d/nodesource.list \ && echo "deb-src https://deb.nodesource.com/${NODEREPO} jessie main" >> /etc/apt/sources.list.d/nodesource.list \ \ # Install deps && apt-get update && apt-get install -y --force-yes \ libicu-dev \ zlib1g-dev \ libmcrypt-dev \ libfreetype6-dev \ libjpeg62-turbo-dev \ libmcrypt-dev \ libpng-dev \ libxml2-dev \ libicu52 \ zlib1g \ nodejs \ sudo \ --no-install-recommends && rm -r /var/lib/apt/lists/* # Install extensions RUN set -xe \ && docker-php-ext-configure \ gd \ --with-gd \ --with-freetype-dir=/usr/include/ \ --with-png-dir=/usr/include/ \ --with-jpeg-dir=/usr/include/ \ \ \ && docker-php-ext-install -j$(nproc) \ gd \ intl \ mbstring \ mcrypt \ opcache \ pdo_mysql \ soap \ exif \ fileinfo \ zip # Oro php settings RUN { \ echo "memory_limit=1024M"; \ echo "date.timezone=Europe/Berlin"; \ echo "detect_unicode=off"; \ echo "xdebug.scream=off"; \ } > /usr/local/etc/php/conf.d/custom.ini COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"] WORKDIR /var/www EXPOSE 9000 CMD ["php-fpm"]
{ "content_hash": "bfe597e8c263cf776b245bf7ba17ef3a", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 114, "avg_line_length": 24.44927536231884, "alnum_prop": 0.6621221102548903, "repo_name": "sbani/docker-php", "id": "de0c305d1515fa422c00baaeaecd4ba1872a4f53", "size": "1687", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "5/fpm/Dockerfile", "mode": "33188", "license": "mit", "language": [ { "name": "Shell", "bytes": "3084" } ], "symlink_target": "" }
import React from "react"; import { trans_obj } from "../i18n"; import { MultiWidgetType, WidgetProps } from "./types"; const checkboxIsActive = (field: string, value: string[] | null) => value !== null && value.includes(field); const flipSetValue = (set: string[], value: string, isActive: boolean) => { if (isActive) { return set.includes(value) ? set : [...set, value]; } else { return set.filter((v) => v !== value); } }; const deserialize = (value?: string): string[] | null => { if (!value) { return null; } let rv = value.split(",").map((x) => x.trim()); if (rv.length === 1 && rv[0] === "") { rv = []; } return rv; }; export function CheckboxesInputWidget({ disabled, type, onChange, value, placeholder, }: WidgetProps<string, MultiWidgetType>): JSX.Element { const deserializedValue = deserialize(value); const deserializedPlaceholder = deserialize(placeholder); return ( <div className="checkboxes-widget"> {type.choices?.map(([key, description]) => ( <div className="form-check" key={key}> <label className="form-check-label"> <input className="form-check-input" type="checkbox" disabled={disabled} checked={checkboxIsActive( key, deserializedValue ?? deserializedPlaceholder )} onChange={(ev) => { const newValue = flipSetValue( deserializedValue || [], key, ev.target.checked ); onChange(newValue.join(", ")); }} /> {trans_obj(description)} </label> </div> ))} </div> ); }
{ "content_hash": "f726f3894e1115bdf8b9c83940898696", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 75, "avg_line_length": 27.215384615384615, "alnum_prop": 0.5313736574335783, "repo_name": "lektor/lektor", "id": "ce857d38b3d5fb3c3454dfc4a536edbc22d6cc5a", "size": "1769", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "frontend/js/widgets/CheckboxesInputWidget.tsx", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "2475" }, { "name": "HTML", "bytes": "29220" }, { "name": "JavaScript", "bytes": "1480" }, { "name": "Makefile", "bytes": "1101" }, { "name": "Python", "bytes": "721680" }, { "name": "SCSS", "bytes": "10560" }, { "name": "TypeScript", "bytes": "145010" } ], "symlink_target": "" }
Deletes the user. ## SYNTAX ### ClientObject (Default) ``` Remove-SPClientUser [-ClientContext <ClientContext>] [-ClientObject] <User> ``` ### Identity ``` Remove-SPClientUser [-ClientContext <ClientContext>] -Identity <Int32> ``` ### Name ``` Remove-SPClientUser [-ClientContext <ClientContext>] -Name <String> ``` ### Email ``` Remove-SPClientUser [-ClientContext <ClientContext>] -Email <String> ``` ## DESCRIPTION The Remove-SPClientUser function removes the user from the site. If the user could not be found, throws exception. ## EXAMPLES ### -------------------------- Example 1 -------------------------- ``` Remove-SPClientUser $user ``` ### -------------------------- Example 2 -------------------------- ``` Remove-SPClientUser -Identity 7 ``` ### -------------------------- Example 3 -------------------------- ``` Remove-SPClientUser -Name "i:0#.f|membership|admin@example.com" ``` ### -------------------------- Example 4 -------------------------- ``` Remove-SPClientUser -Email "admin@example.com" ``` ## PARAMETERS ### -ClientContext Indicates the client context. If not specified, uses a default context. ```yaml Type: ClientContext Parameter Sets: (All) Aliases: Required: False Position: Named Default value: $SPClient.ClientContext Accept pipeline input: False Accept wildcard characters: False ``` ### -ClientObject Indicates the user to delete. ```yaml Type: User Parameter Sets: ClientObject Aliases: Required: True Position: 1 Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` ### -Identity Indicates the user ID. ```yaml Type: Int32 Parameter Sets: Identity Aliases: Id Required: True Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ``` ### -Name Indicates the user login name. ```yaml Type: String Parameter Sets: Name Aliases: LoginName Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ### -Email Indicates the user E-mail. ```yaml Type: String Parameter Sets: Email Aliases: Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ``` ## INPUTS ### None or Microsoft.SharePoint.Client.User ## OUTPUTS ### None ## NOTES ## RELATED LINKS [https://github.com/karamem0/SPClient/blob/master/doc/Remove-SPClientUser.md](https://github.com/karamem0/SPClient/blob/master/doc/Remove-SPClientUser.md)
{ "content_hash": "b74a1003f6240667694b32d6eb0a5ca0", "timestamp": "", "source": "github", "line_count": 142, "max_line_length": 154, "avg_line_length": 17.45774647887324, "alnum_prop": 0.6696248487293264, "repo_name": "karamem0/SPClient", "id": "332e891ed962f1cdaf24a00cf689f3e6ac4d444c", "size": "2514", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "doc/Remove-SPClientUser.md", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "20908" }, { "name": "PowerShell", "bytes": "579806" } ], "symlink_target": "" }
package org.apache.mina.integration.beans; import java.beans.PropertyEditor; /** * A {@link PropertyEditor} which converts a {@link String} into * an {@link Double} and vice versa. * * @author <a href="http://mina.apache.org">Apache MINA Project</a> */ public class DoubleEditor extends NumberEditor { @Override protected Object toValue(String text, int radix) { if (radix != 10) { return Double.valueOf(String.valueOf(Long.parseLong(text, radix))); } return Double.parseDouble(text); } @Override protected Object defaultValue() { return (double) 0f; } }
{ "content_hash": "feab6884c73657f4235b02b9eebb6283", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 79, "avg_line_length": 25.28, "alnum_prop": 0.6503164556962026, "repo_name": "EArdeleanu/gateway", "id": "e911f32d007b27eddae22cd7320d32fa978a323e", "size": "1456", "binary": false, "copies": "6", "ref": "refs/heads/develop", "path": "mina.core/integration-beans/src/main/java/org/apache/mina/integration/beans/DoubleEditor.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "2043" }, { "name": "HTML", "bytes": "38948" }, { "name": "Java", "bytes": "10621741" }, { "name": "JavaScript", "bytes": "3868" }, { "name": "Shell", "bytes": "5304" }, { "name": "XSLT", "bytes": "5493" } ], "symlink_target": "" }
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>houshu | gensen</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">gensen</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="_houshu_houshu_.html">&quot;houshu/houshu&quot;</a> </li> <li> <a href="_houshu_houshu_.houshu.html">houshu</a> </li> </ul> <h1>Module houshu</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel"> <h3 class="tsd-before-signature">Callable</h3> <ul class="tsd-signatures tsd-kind-module tsd-parent-kind-external-module"> <li class="tsd-signature tsd-kind-icon">houshu<span class="tsd-signature-symbol">(</span>originZeikomi<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Kingaku</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/jptax/gensen/blob/82f0de7/lib/houshu/houshu.ts#L3">houshu/houshu.ts:3</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>originZeikomi: <span class="tsd-signature-type">number</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Kingaku</span></h4> </li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section "> <h3>Variables</h3> <ul class="tsd-index-list"> <li class="tsd-kind-variable tsd-parent-kind-module"><a href="_houshu_houshu_.houshu.html#banushi" class="tsd-kind-icon">banushi</a></li> <li class="tsd-kind-variable tsd-parent-kind-module"><a href="_houshu_houshu_.houshu.html#gaikouin" class="tsd-kind-icon">gaikouin</a></li> <li class="tsd-kind-variable tsd-parent-kind-module"><a href="_houshu_houshu_.houshu.html#hostess" class="tsd-kind-icon">hostess</a></li> <li class="tsd-kind-variable tsd-parent-kind-module"><a href="_houshu_houshu_.houshu.html#koukokushoukin" class="tsd-kind-icon">koukoku<wbr>Shoukin</a></li> <li class="tsd-kind-variable tsd-parent-kind-module"><a href="_houshu_houshu_.houshu.html#proboxer" class="tsd-kind-icon">pro<wbr>Boxer</a></li> <li class="tsd-kind-variable tsd-parent-kind-module"><a href="_houshu_houshu_.houshu.html#shihoushoshi" class="tsd-kind-icon">shihoushoshi</a></li> <li class="tsd-kind-variable tsd-parent-kind-module"><a href="_houshu_houshu_.houshu.html#shinryou" class="tsd-kind-icon">shinryou</a></li> <li class="tsd-kind-variable tsd-parent-kind-module"><a href="_houshu_houshu_.houshu.html#standard" class="tsd-kind-icon">standard</a></li> <li class="tsd-kind-variable tsd-parent-kind-module"><a href="_houshu_houshu_.houshu.html#tedori" class="tsd-kind-icon">tedori</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Variables</h2> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"> <a name="banushi" class="tsd-anchor"></a> <h3>banushi</h3> <div class="tsd-signature tsd-kind-icon">banushi<span class="tsd-signature-symbol">:</span> <a href="_houshu_calculator_banushi_.html#default" class="tsd-signature-type">default</a><span class="tsd-signature-symbol"> =&nbsp;calculator.banushi</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/jptax/gensen/blob/82f0de7/lib/houshu/houshu.ts#L9">houshu/houshu.ts:9</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"> <a name="gaikouin" class="tsd-anchor"></a> <h3>gaikouin</h3> <div class="tsd-signature tsd-kind-icon">gaikouin<span class="tsd-signature-symbol">:</span> <a href="_houshu_calculator_gaikouin_.html#default" class="tsd-signature-type">default</a><span class="tsd-signature-symbol"> =&nbsp;calculator.gaikouin</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/jptax/gensen/blob/82f0de7/lib/houshu/houshu.ts#L10">houshu/houshu.ts:10</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"> <a name="hostess" class="tsd-anchor"></a> <h3>hostess</h3> <div class="tsd-signature tsd-kind-icon">hostess<span class="tsd-signature-symbol">:</span> <a href="_houshu_calculator_hostess_.html#default" class="tsd-signature-type">default</a><span class="tsd-signature-symbol"> =&nbsp;calculator.hostess</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/jptax/gensen/blob/82f0de7/lib/houshu/houshu.ts#L11">houshu/houshu.ts:11</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"> <a name="koukokushoukin" class="tsd-anchor"></a> <h3>koukoku<wbr>Shoukin</h3> <div class="tsd-signature tsd-kind-icon">koukoku<wbr>Shoukin<span class="tsd-signature-symbol">:</span> <a href="_houshu_calculator_koukoku_shoukin_.html#default" class="tsd-signature-type">default</a><span class="tsd-signature-symbol"> =&nbsp;calculator.koukokuShoukin</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/jptax/gensen/blob/82f0de7/lib/houshu/houshu.ts#L12">houshu/houshu.ts:12</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"> <a name="proboxer" class="tsd-anchor"></a> <h3>pro<wbr>Boxer</h3> <div class="tsd-signature tsd-kind-icon">pro<wbr>Boxer<span class="tsd-signature-symbol">:</span> <a href="_houshu_calculator_pro_boxer_.html#default" class="tsd-signature-type">default</a><span class="tsd-signature-symbol"> =&nbsp;calculator.proBoxer</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/jptax/gensen/blob/82f0de7/lib/houshu/houshu.ts#L13">houshu/houshu.ts:13</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"> <a name="shihoushoshi" class="tsd-anchor"></a> <h3>shihoushoshi</h3> <div class="tsd-signature tsd-kind-icon">shihoushoshi<span class="tsd-signature-symbol">:</span> <a href="_houshu_calculator_shihoushoshi_.html#default" class="tsd-signature-type">default</a><span class="tsd-signature-symbol"> =&nbsp;calculator.shihoushoshi</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/jptax/gensen/blob/82f0de7/lib/houshu/houshu.ts#L14">houshu/houshu.ts:14</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"> <a name="shinryou" class="tsd-anchor"></a> <h3>shinryou</h3> <div class="tsd-signature tsd-kind-icon">shinryou<span class="tsd-signature-symbol">:</span> <a href="_houshu_calculator_shinryou_.html#default" class="tsd-signature-type">default</a><span class="tsd-signature-symbol"> =&nbsp;calculator.shinryou</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/jptax/gensen/blob/82f0de7/lib/houshu/houshu.ts#L15">houshu/houshu.ts:15</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"> <a name="standard" class="tsd-anchor"></a> <h3>standard</h3> <div class="tsd-signature tsd-kind-icon">standard<span class="tsd-signature-symbol">:</span> <a href="_houshu_calculator_standard_.html#default" class="tsd-signature-type">default</a><span class="tsd-signature-symbol"> =&nbsp;calculator.standard</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/jptax/gensen/blob/82f0de7/lib/houshu/houshu.ts#L16">houshu/houshu.ts:16</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-module"> <a name="tedori" class="tsd-anchor"></a> <h3>tedori</h3> <div class="tsd-signature tsd-kind-icon">tedori<span class="tsd-signature-symbol">:</span> <a href="_houshu_calculator_tedori_.html#default" class="tsd-signature-type">default</a><span class="tsd-signature-symbol"> =&nbsp;calculator.tedori</span></div> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/jptax/gensen/blob/82f0de7/lib/houshu/houshu.ts#L17">houshu/houshu.ts:17</a></li> </ul> </aside> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_banushi_.html">"houshu/calculator/banushi"</a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_calculator_.html">"houshu/calculator/calculator"</a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_gaikouin_.html">"houshu/calculator/gaikouin"</a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_hostess_.html">"houshu/calculator/hostess"</a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_index_.html">"houshu/calculator/index"</a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_koukoku_shoukin_.html">"houshu/calculator/koukoku-<wbr>shoukin"</a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_pro_boxer_.html">"houshu/calculator/pro-<wbr>boxer"</a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_shihoushoshi_.html">"houshu/calculator/shihoushoshi"</a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_shinryou_.html">"houshu/calculator/shinryou"</a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_standard_.html">"houshu/calculator/standard"</a> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_calculator_tedori_.html">"houshu/calculator/tedori"</a> </li> <li class="current tsd-kind-external-module"> <a href="_houshu_houshu_.html">"houshu/houshu"</a> <ul> <li class="current tsd-kind-module tsd-parent-kind-external-module"> <a href="_houshu_houshu_.houshu.html">houshu</a> </li> </ul> </li> <li class=" tsd-kind-external-module"> <a href="_houshu_index_.html">"houshu/index"</a> </li> <li class=" tsd-kind-external-module"> <a href="_index_.html">"index"</a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> <li class=" tsd-kind-variable tsd-parent-kind-module"> <a href="_houshu_houshu_.houshu.html#banushi" class="tsd-kind-icon">banushi</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-module"> <a href="_houshu_houshu_.houshu.html#gaikouin" class="tsd-kind-icon">gaikouin</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-module"> <a href="_houshu_houshu_.houshu.html#hostess" class="tsd-kind-icon">hostess</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-module"> <a href="_houshu_houshu_.houshu.html#koukokushoukin" class="tsd-kind-icon">koukoku<wbr>Shoukin</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-module"> <a href="_houshu_houshu_.houshu.html#proboxer" class="tsd-kind-icon">pro<wbr>Boxer</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-module"> <a href="_houshu_houshu_.houshu.html#shihoushoshi" class="tsd-kind-icon">shihoushoshi</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-module"> <a href="_houshu_houshu_.houshu.html#shinryou" class="tsd-kind-icon">shinryou</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-module"> <a href="_houshu_houshu_.houshu.html#standard" class="tsd-kind-icon">standard</a> </li> <li class=" tsd-kind-variable tsd-parent-kind-module"> <a href="_houshu_houshu_.houshu.html#tedori" class="tsd-kind-icon">tedori</a> </li> </ul> </nav> </div> </div> </div> <footer class="with-border-bottom"> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li> <li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li> <li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li> <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li> <li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li> <li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li> <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li> <li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li> <li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li> <li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> <li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li> <li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> </ul> </div> </div> </footer> <div class="container tsd-generator"> <p>Generated using <a href="http://typedoc.org/" target="_blank">TypeDoc</a></p> </div> <div class="overlay"></div> <script src="../assets/js/main.js"></script> <script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script> </body> </html>
{ "content_hash": "a96868f9ac14e496c45601af8bfbc4c7", "timestamp": "", "source": "github", "line_count": 364, "max_line_length": 336, "avg_line_length": 54.37637362637363, "alnum_prop": 0.6581619764563229, "repo_name": "jptax/gensen", "id": "20cca2c2556d0f0ded35d1f02e48ed353af18f61", "size": "19793", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/api/modules/_houshu_houshu_.houshu.html", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "574" }, { "name": "TypeScript", "bytes": "17006" } ], "symlink_target": "" }
//using System.Collections.Generic; //using System.Linq; //namespace Quilt4.Service.SqlRepository.Extensions //{ // public static class DashboardProjectExtensions // { // public static IEnumerable<Entity.DashboardPageProject> ToDashboardProjects( // this IEnumerable<DashboardPageProject> items) // { // return items?.Select(x => x.ToDashboardProject()); // } // public static Entity.DashboardPageProject ToDashboardProject(this DashboardPageProject item) // { // if (item == null) // return null; // return new Entity.DashboardPageProject // { // ProjectKey = item.ProjectKey, // Name = item.Name, // Versions = item.VersionCount, // Sessions = item.SessionCount, // IssueTypes = item.IssueTypeCount, // Issues = item.IssueCount, // DashboardColor = item.DashboardColor // }; // } // } //}
{ "content_hash": "91fb937a0aa6ae9acabea34460d6d0a0", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 102, "avg_line_length": 33.25806451612903, "alnum_prop": 0.562560620756547, "repo_name": "Quilt4/Quilt4.Service", "id": "b851a0476dfeecbe7a77ba20d2de51fc4f958af6", "size": "1033", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Quilt4.Service.Repository/Extensions/DashboardProjectExtensions.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "108" }, { "name": "Batchfile", "bytes": "70" }, { "name": "C#", "bytes": "483370" }, { "name": "CSS", "bytes": "3276" }, { "name": "HTML", "bytes": "5069" }, { "name": "JavaScript", "bytes": "10918" }, { "name": "PowerShell", "bytes": "11122" } ], "symlink_target": "" }
namespace Google.Cloud.DataLabeling.V1Beta1.Snippets { // [START datalabeling_v1beta1_generated_DataLabelingService_PauseEvaluationJob_async_flattened_resourceNames] using Google.Cloud.DataLabeling.V1Beta1; using System.Threading.Tasks; public sealed partial class GeneratedDataLabelingServiceClientSnippets { /// <summary>Snippet for PauseEvaluationJobAsync</summary> /// <remarks> /// This snippet has been automatically generated and should be regarded as a code template only. /// It will require modifications to work: /// - It may require correct/in-range values for request initialization. /// - It may require specifying regional endpoints when creating the service client as shown in /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. /// </remarks> public async Task PauseEvaluationJobResourceNamesAsync() { // Create client DataLabelingServiceClient dataLabelingServiceClient = await DataLabelingServiceClient.CreateAsync(); // Initialize request argument(s) EvaluationJobName name = EvaluationJobName.FromProjectEvaluationJob("[PROJECT]", "[EVALUATION_JOB]"); // Make the request await dataLabelingServiceClient.PauseEvaluationJobAsync(name); } } // [END datalabeling_v1beta1_generated_DataLabelingService_PauseEvaluationJob_async_flattened_resourceNames] }
{ "content_hash": "8a339c2084b00288dbe7dc5d2a977549", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 114, "avg_line_length": 53.464285714285715, "alnum_prop": 0.7147628590514362, "repo_name": "googleapis/google-cloud-dotnet", "id": "66e353199b12a2cb911fd758a60e999f0da4b3e4", "size": "2119", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "apis/Google.Cloud.DataLabeling.V1Beta1/Google.Cloud.DataLabeling.V1Beta1.GeneratedSnippets/DataLabelingServiceClient.PauseEvaluationJobResourceNamesAsyncSnippet.g.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "767" }, { "name": "C#", "bytes": "319820004" }, { "name": "Dockerfile", "bytes": "3415" }, { "name": "PowerShell", "bytes": "3303" }, { "name": "Python", "bytes": "2744" }, { "name": "Shell", "bytes": "65881" } ], "symlink_target": "" }
package com.github.webelement.wrappers.table; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; /** * API for working with HTML <i>tbody</i> element. * * @author Mairbek Khadikov */ public class TableBody extends TableRowContainer { public static final String TAG_NAME = "tbody"; public TableBody(WebDriver driver, WebElement element) { super(driver, element, TAG_NAME); } }
{ "content_hash": "914151597a90319dfae78f249ea92517", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 60, "avg_line_length": 25.235294117647058, "alnum_prop": 0.7249417249417249, "repo_name": "mairbek/webelement-wrappers", "id": "611f79a54294712dd1c659bb70d2791dd0adc463", "size": "429", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/github/webelement/wrappers/table/TableBody.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "9468" } ], "symlink_target": "" }
<?php include '_templates/sitewide.php'; $page['name'] = '403'; $page['title'] = 'Access Denied &sdot; elementary'; include $template['header']; ?> <script> ga('send', 'event', '403: Forbidden', window.location.host); </script> <div class="row"> <div class="column alert"> <i class="warning fa fa-warning"></i> </div> <div class="column alert"> <h3>Sorry, access is denied.</h3> <p>You don't have permission to view the requested resource.</p> </div> <div class="row"> <a class="button suggested-action" href="/">Go to Home Page</a> </div> </div> <?php include $template['footer']; ?>
{ "content_hash": "b99847932bf8e9f26c410e104a6dfe55", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 72, "avg_line_length": 24.74074074074074, "alnum_prop": 0.5793413173652695, "repo_name": "luiscauro/mvp", "id": "e604ae7097d3d497cdb30927c362ecaa42c85980", "size": "668", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "403.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "46576" }, { "name": "JavaScript", "bytes": "29183" }, { "name": "Nginx", "bytes": "2151" }, { "name": "PHP", "bytes": "162384" }, { "name": "Shell", "bytes": "1387" } ], "symlink_target": "" }
<?xml version="1.0"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.mnemonic</groupId> <artifactId>mnemonic-memory-services</artifactId> <version>0.12.0-SNAPSHOT</version> </parent> <artifactId>mnemonic-java-vmem-service</artifactId> <name>mnemonic-java-vmem-service</name> <dependencies> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> </dependency> </dependencies> <build> <resources> <resource> <directory>src/main/resources</directory> </resource> </resources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-scm-publish-plugin</artifactId> <configuration> <checkoutDirectory>${project.build.directory}/scmpublish</checkoutDirectory> <checkinComment>Publishing javadoc for ${project.artifactId}:${project.version}</checkinComment> <content>${project.reporting.outputDirectory}/apidocs</content> <skipDeletedFiles>true</skipDeletedFiles> <pubScmUrl>scm:git:https://github.com/bigdata-memory/mnenomic-project.git</pubScmUrl> <scmBranch>gh-pages</scmBranch> <!-- branch with static site --> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> </plugin> </plugins> </build> <profiles> <profile> <id>doc</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <aggregate>true</aggregate> <show>public</show> <nohelp>true</nohelp> <header>Mnenomic-JavaVMemAllocator, ${project.version}</header> <footer>Mnenomic-JavaVMemAllocator, ${project.version}</footer> <doctitle>Mnenomic, ${project.version}</doctitle> <links> <link>http://static.springsource.org/spring/docs/3.0.x/javadoc-api/</link> <additionalparam>-Xdoclint:all -Xdoclint:-missing</additionalparam> </links> </configuration> <executions> <execution> <id>attach-javadocs</id> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> <profile> <id>test</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <argLine>-Xmx2g -XX:MaxPermSize=1g</argLine> <suiteXmlFiles> <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile> </suiteXmlFiles> </configuration> </plugin> </plugins> </build> </profile> </profiles> </project>
{ "content_hash": "578fdb9de90cb311d5b6b397e4773319", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 108, "avg_line_length": 34.59055118110236, "alnum_prop": 0.6175734122467562, "repo_name": "lql5083psu/incubator-mnemonic", "id": "abd27a272075c7b63bc0e62c52fe9c2c8ed8b510", "size": "4393", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "mnemonic-memory-services/mnemonic-java-vmem-service/pom.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "106919" }, { "name": "CMake", "bytes": "10889" }, { "name": "Dockerfile", "bytes": "6993" }, { "name": "Java", "bytes": "793859" }, { "name": "Python", "bytes": "10959" }, { "name": "Scala", "bytes": "51773" }, { "name": "Shell", "bytes": "11722" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>T-man tests with async/await</title> <link rel="stylesheet" type="text/css" href="../../browser/tman.css"> </head> <body> </body> <script src="../../browser/tman.js"></script> <script src="test-async.js"></script> </html>
{ "content_hash": "dfcd6fe1d2528c1751656e35cfad2e3d", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 73, "avg_line_length": 26.333333333333332, "alnum_prop": 0.5981012658227848, "repo_name": "thunks/tman", "id": "e86e4fadc35dac5d95124f217bfcf88a25d1d9eb", "size": "316", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/browser/index-async.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "662" }, { "name": "CoffeeScript", "bytes": "1796" }, { "name": "HTML", "bytes": "920" }, { "name": "JavaScript", "bytes": "171742" }, { "name": "Makefile", "bytes": "947" }, { "name": "TypeScript", "bytes": "7104" } ], "symlink_target": "" }
<?php // autoload_namespaces.php @generated by Composer $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( 'Widop\\HttpAdapterBundle' => array($vendorDir . '/widop/http-adapter-bundle'), 'Widop\\HttpAdapter' => array($vendorDir . '/widop/http-adapter/src'), 'Widop\\GoogleAnalyticsBundle' => array($vendorDir . '/widop/google-analytics-bundle'), 'Widop\\GoogleAnalytics' => array($vendorDir . '/widop/google-analytics/src'), 'Twig_Extensions_' => array($vendorDir . '/twig/extensions/lib'), 'Twig_' => array($vendorDir . '/twig/twig/lib'), 'Symfony\\Bundle\\SwiftmailerBundle' => array($vendorDir . '/symfony/swiftmailer-bundle'), 'Symfony\\Bundle\\MonologBundle' => array($vendorDir . '/symfony/monolog-bundle'), 'Symfony\\Bundle\\AsseticBundle' => array($vendorDir . '/symfony/assetic-bundle'), 'Symfony\\' => array($vendorDir . '/symfony/symfony/src'), 'Sensio\\Bundle\\GeneratorBundle' => array($vendorDir . '/sensio/generator-bundle'), 'Sensio\\Bundle\\FrameworkExtraBundle' => array($vendorDir . '/sensio/framework-extra-bundle'), 'Sensio\\Bundle\\DistributionBundle' => array($vendorDir . '/sensio/distribution-bundle'), 'Psr\\Log\\' => array($vendorDir . '/psr/log'), 'PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src'), 'Monolog' => array($vendorDir . '/monolog/monolog/src'), 'Metadata\\' => array($vendorDir . '/jms/metadata/src'), 'JMS\\SecurityExtraBundle' => array($vendorDir . '/jms/security-extra-bundle'), 'JMS\\DiExtraBundle' => array($vendorDir . '/jms/di-extra-bundle'), 'JMS\\AopBundle' => array($vendorDir . '/jms/aop-bundle'), 'JMS\\' => array($vendorDir . '/jms/parser-lib/src'), 'FOS\\UserBundle' => array($vendorDir . '/friendsofsymfony/user-bundle'), 'Doctrine\\ORM\\' => array($vendorDir . '/doctrine/orm/lib'), 'Doctrine\\DBAL\\' => array($vendorDir . '/doctrine/dbal/lib'), 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'), 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), 'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'), 'Doctrine\\Common\\Cache\\' => array($vendorDir . '/doctrine/cache/lib'), 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib'), 'Doctrine\\Common\\' => array($vendorDir . '/doctrine/common/lib'), 'Doctrine\\Bundle\\DoctrineBundle' => array($vendorDir . '/doctrine/doctrine-bundle'), 'CG\\' => array($vendorDir . '/jms/cg/src'), 'Assetic' => array($vendorDir . '/kriswallsmith/assetic/src'), '' => array($baseDir . '/src'), );
{ "content_hash": "5aa8fca6dd7e11bdf58c7efcc5f8354d", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 99, "avg_line_length": 62.58139534883721, "alnum_prop": 0.6525455221107395, "repo_name": "Julink64/ndi_engiineers", "id": "42112c2fcbbf5c79a834bb488bf7c93377a34ed6", "size": "2691", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vendor/composer/autoload_namespaces.php", "mode": "33261", "license": "mit", "language": [], "symlink_target": "" }
<?php /* * This file is part of BardisCMS. * * (c) George Bardis <george@bardis.info> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ /** * This file is part of the <name> project. * * (c) <yourname> <youremail> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Application\Sonata\ClassificationBundle\Entity; use Sonata\ClassificationBundle\Entity\BaseCategory as BaseCategory; /** * This file has been generated by the Sonata EasyExtends bundle ( http://sonata-project.org/bundles/easy-extends ). * * References : * working with object : http://www.doctrine-project.org/projects/orm/2.0/docs/reference/working-with-objects/en * * @author <yourname> <youremail> */ class Category extends BaseCategory { /** * @var int */ protected $id; /** * Get id. * * @return int $id */ public function getId() { return $this->id; } }
{ "content_hash": "a3259f297ef17ec9d5ff42a872bdee5c", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 116, "avg_line_length": 22.270833333333332, "alnum_prop": 0.6641721234798877, "repo_name": "bardius/BardisCMS", "id": "3822df30d17c2728219b9564e7a93afd22a847fd", "size": "1069", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Application/Sonata/ClassificationBundle/Entity/Category.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "14215" }, { "name": "Batchfile", "bytes": "618" }, { "name": "CSS", "bytes": "60140" }, { "name": "HTML", "bytes": "352947" }, { "name": "JavaScript", "bytes": "53945" }, { "name": "PHP", "bytes": "824586" }, { "name": "Shell", "bytes": "21888" } ], "symlink_target": "" }
#include <assert.h> #include <string.h> #include "nffs/nffs.h" #include "nffs_priv.h" int nffs_path_parse_next(struct nffs_path_parser *parser) { const char *slash_start; int token_end; int token_len; if (parser->npp_token_type == NFFS_PATH_TOKEN_LEAF) { return FS_EINVAL; } slash_start = strchr(parser->npp_path + parser->npp_off, '/'); if (slash_start == NULL) { if (parser->npp_token_type == NFFS_PATH_TOKEN_NONE) { return FS_EINVAL; } parser->npp_token_type = NFFS_PATH_TOKEN_LEAF; token_len = strlen(parser->npp_path + parser->npp_off); } else { parser->npp_token_type = NFFS_PATH_TOKEN_BRANCH; token_end = slash_start - parser->npp_path; token_len = token_end - parser->npp_off; } if (token_len > NFFS_FILENAME_MAX_LEN) { return FS_EINVAL; } parser->npp_token = parser->npp_path + parser->npp_off; parser->npp_token_len = token_len; parser->npp_off += token_len + 1; return 0; } void nffs_path_parser_new(struct nffs_path_parser *parser, const char *path) { parser->npp_token_type = NFFS_PATH_TOKEN_NONE; parser->npp_path = path; parser->npp_off = 0; } static int nffs_path_find_child(struct nffs_inode_entry *parent, const char *name, int name_len, struct nffs_inode_entry **out_inode_entry) { struct nffs_inode_entry *cur; struct nffs_inode inode; int cmp; int rc; SLIST_FOREACH(cur, &parent->nie_child_list, nie_sibling_next) { rc = nffs_inode_from_entry(&inode, cur); if (rc != 0) { return rc; } rc = nffs_inode_filename_cmp_ram(&inode, name, name_len, &cmp); if (rc != 0) { return rc; } if (cmp == 0) { *out_inode_entry = cur; return 0; } if (cmp > 0) { break; } } return FS_ENOENT; } /* * Return the inode and optionally it's parent associated with the input path * nffs_path_parser struct used to track location in hierarchy */ int nffs_path_find(struct nffs_path_parser *parser, struct nffs_inode_entry **out_inode_entry, struct nffs_inode_entry **out_parent) { struct nffs_inode_entry *parent; struct nffs_inode_entry *inode_entry; int rc; *out_inode_entry = NULL; if (out_parent != NULL) { *out_parent = NULL; } inode_entry = NULL; while (1) { parent = inode_entry; rc = nffs_path_parse_next(parser); if (rc != 0) { return rc; } switch (parser->npp_token_type) { case NFFS_PATH_TOKEN_BRANCH: if (parent == NULL) { /* First directory must be root. */ if (parser->npp_token_len != 0) { return FS_ENOENT; } inode_entry = nffs_root_dir; } else { /* Ignore empty intermediate directory names. */ if (parser->npp_token_len == 0) { break; } rc = nffs_path_find_child(parent, parser->npp_token, parser->npp_token_len, &inode_entry); if (rc != 0) { goto done; } } break; case NFFS_PATH_TOKEN_LEAF: if (parent == NULL) { /* First token must be root directory. */ return FS_ENOENT; } if (parser->npp_token_len == 0) { /* If the path ends with a slash, the leaf is the parent, not * the trailing empty token. */ inode_entry = parent; rc = 0; } else { rc = nffs_path_find_child(parent, parser->npp_token, parser->npp_token_len, &inode_entry); } goto done; } } done: *out_inode_entry = inode_entry; if (out_parent != NULL) { *out_parent = parent; } return rc; } int nffs_path_find_inode_entry(const char *filename, struct nffs_inode_entry **out_inode_entry) { struct nffs_path_parser parser; int rc; nffs_path_parser_new(&parser, filename); rc = nffs_path_find(&parser, out_inode_entry, NULL); return rc; } /** * Unlinks the file or directory at the specified path. If the path refers to * a directory, all the directory's descendants are recursively unlinked. Any * open file handles refering to an unlinked file remain valid, and can be * read from and written to. * * @path The path of the file or directory to unlink. * * @return 0 on success; nonzero on failure. */ int nffs_path_unlink(const char *path) { struct nffs_inode_entry *inode_entry; struct nffs_inode inode; int rc; rc = nffs_path_find_inode_entry(path, &inode_entry); if (rc != 0) { return rc; } rc = nffs_inode_from_entry(&inode, inode_entry); if (rc != 0) { return rc; } rc = nffs_inode_unlink(&inode); if (rc != 0) { return rc; } return 0; } /** * Performs a rename and / or move of the specified source path to the * specified destination. The source path can refer to either a file or a * directory. All intermediate directories in the destination path must * already have been created. If the source path refers to a file, the * destination path must contain a full filename path (i.e., if performing a * move, the destination path should end with the same filename in the source * path). If an object already exists at the specified destination path, this * function causes it to be unlinked prior to the rename (i.e., the destination * gets clobbered). * * @param from The source path. * @param to The destination path. * * @return 0 on success; * nonzero on failure. */ int nffs_path_rename(const char *from, const char *to) { struct nffs_path_parser parser; struct nffs_inode_entry *from_inode_entry; struct nffs_inode_entry *to_inode_entry; struct nffs_inode_entry *from_parent; struct nffs_inode_entry *to_parent; struct nffs_inode inode; int rc; nffs_path_parser_new(&parser, from); rc = nffs_path_find(&parser, &from_inode_entry, &from_parent); if (rc != 0) { return rc; } nffs_path_parser_new(&parser, to); rc = nffs_path_find(&parser, &to_inode_entry, &to_parent); switch (rc) { case 0: /* The user is clobbering something with the rename. */ if (nffs_hash_id_is_dir(from_inode_entry->nie_hash_entry.nhe_id) ^ nffs_hash_id_is_dir(to_inode_entry->nie_hash_entry.nhe_id)) { /* Cannot clobber one type of file with another. */ return FS_EINVAL; } rc = nffs_inode_from_entry(&inode, to_inode_entry); if (rc != 0) { return rc; } /* * Don't allow renames if the inode has been deleted * Side-effect is that we've restored the inode as needed. */ if (nffs_inode_is_deleted(from_inode_entry)) { assert(0); return FS_ENOENT; } rc = nffs_inode_unlink(&inode); if (rc != 0) { return rc; } break; case FS_ENOENT: assert(to_parent != NULL); if (parser.npp_token_type != NFFS_PATH_TOKEN_LEAF) { /* Intermediate directory doesn't exist. */ return FS_EINVAL; } break; default: return rc; } rc = nffs_inode_rename(from_inode_entry, to_parent, parser.npp_token); if (rc != 0) { return rc; } return 0; } /** * Creates a new directory at the specified path. * * @param path The path of the directory to create. * * @return 0 on success; * FS_EEXIST if there is another file or * directory at the specified path. * FS_ENONT if a required intermediate directory * does not exist. */ int nffs_path_new_dir(const char *path, struct nffs_inode_entry **out_inode_entry) { struct nffs_path_parser parser; struct nffs_inode_entry *inode_entry; struct nffs_inode_entry *parent; int rc; nffs_path_parser_new(&parser, path); rc = nffs_path_find(&parser, &inode_entry, &parent); if (rc == 0) { return FS_EEXIST; } if (rc != FS_ENOENT) { return rc; } if (parser.npp_token_type != NFFS_PATH_TOKEN_LEAF || parent == NULL) { return FS_ENOENT; } rc = nffs_file_new(parent, parser.npp_token, parser.npp_token_len, 1, &inode_entry); if (rc != 0) { return rc; } if (out_inode_entry != NULL) { *out_inode_entry = inode_entry; } return 0; }
{ "content_hash": "075ca85d28d8f26fca40756cb45873f4", "timestamp": "", "source": "github", "line_count": 336, "max_line_length": 79, "avg_line_length": 27.31845238095238, "alnum_prop": 0.5415622616842793, "repo_name": "wes3/incubator-mynewt-core", "id": "03a8a993adda7251b97525760e967b77febf2c0f", "size": "9986", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "fs/nffs/src/nffs_path.c", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Assembly", "bytes": "3265287" }, { "name": "Batchfile", "bytes": "45131" }, { "name": "C", "bytes": "68085608" }, { "name": "C++", "bytes": "599200" }, { "name": "GDB", "bytes": "16241" }, { "name": "HTML", "bytes": "885343" }, { "name": "Makefile", "bytes": "8990" }, { "name": "Objective-C", "bytes": "1686" }, { "name": "Ruby", "bytes": "25719" }, { "name": "Shell", "bytes": "94847" } ], "symlink_target": "" }
'use strict'; const _ = require('lodash'); // returns true if an id in ensgs is present in the EFFECT/ANN field module.exports = (line, nLine, reAnn, geneIdIndex, genes) => { const matches = line.match(reAnn); if (matches) { const fields = matches[1].split('|'); if (fields.length < geneIdIndex + 1) { return console.error(`line ${nLine}: unexpected format, expected at least ${geneIdIndex + 1} EFFECT/ANN fields separated by |`); } const ids = fields[geneIdIndex].split('-'); const hasPrioritizedGene = _ .some(ids, id => { return genes.ensgs[id] === true || genes.names[id] === true; }); return hasPrioritizedGene; } };
{ "content_hash": "c4081c0808266f3b045b25910050589b", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 140, "avg_line_length": 29.22222222222222, "alnum_prop": 0.541191381495564, "repo_name": "juhis/vcf", "id": "540eef8d6e7c31ddf5dc776f2f61df20cb65bd6e", "size": "789", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "filters/prioritizedGene.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "14428" } ], "symlink_target": "" }
package views.html.b3 package object inline { import views.html.helper._ /** * Creates the implicit Inline FieldConstructor */ implicit val fieldConstructor = new FieldConstructor { def apply(elements: FieldElements) = b3FieldConstructorInline(elements) } }
{ "content_hash": "31e3fe692c3045042a845be2dcd0d37f", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 75, "avg_line_length": 18.666666666666668, "alnum_prop": 0.7321428571428571, "repo_name": "jamesward/play-bootstrap3", "id": "b0b2e5c5c545a9adde59d2a00e5931ab16bb1d9a", "size": "890", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "module/app/views/b3/inline/package.scala", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<?xml version="1.0"?> <!-- Copyright (C) 2009-2015 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. --> <!DOCTYPE feature SYSTEM "gdb-syscalls.dtd"> <!-- This file was generated using the following file: /usr/src/linux/arch/x86/include/asm/unistd_64.h The file mentioned above belongs to the Linux Kernel. --> <syscalls_info> <syscall name="read" number="0"/> <syscall name="write" number="1"/> <syscall name="open" number="2"/> <syscall name="close" number="3"/> <syscall name="stat" number="4"/> <syscall name="fstat" number="5"/> <syscall name="lstat" number="6"/> <syscall name="poll" number="7"/> <syscall name="lseek" number="8"/> <syscall name="mmap" number="9"/> <syscall name="mprotect" number="10"/> <syscall name="munmap" number="11"/> <syscall name="brk" number="12"/> <syscall name="rt_sigaction" number="13"/> <syscall name="rt_sigprocmask" number="14"/> <syscall name="rt_sigreturn" number="15"/> <syscall name="ioctl" number="16"/> <syscall name="pread64" number="17"/> <syscall name="pwrite64" number="18"/> <syscall name="readv" number="19"/> <syscall name="writev" number="20"/> <syscall name="access" number="21"/> <syscall name="pipe" number="22"/> <syscall name="select" number="23"/> <syscall name="sched_yield" number="24"/> <syscall name="mremap" number="25"/> <syscall name="msync" number="26"/> <syscall name="mincore" number="27"/> <syscall name="madvise" number="28"/> <syscall name="shmget" number="29"/> <syscall name="shmat" number="30"/> <syscall name="shmctl" number="31"/> <syscall name="dup" number="32"/> <syscall name="dup2" number="33"/> <syscall name="pause" number="34"/> <syscall name="nanosleep" number="35"/> <syscall name="getitimer" number="36"/> <syscall name="alarm" number="37"/> <syscall name="setitimer" number="38"/> <syscall name="getpid" number="39"/> <syscall name="sendfile" number="40"/> <syscall name="socket" number="41"/> <syscall name="connect" number="42"/> <syscall name="accept" number="43"/> <syscall name="sendto" number="44"/> <syscall name="recvfrom" number="45"/> <syscall name="sendmsg" number="46"/> <syscall name="recvmsg" number="47"/> <syscall name="shutdown" number="48"/> <syscall name="bind" number="49"/> <syscall name="listen" number="50"/> <syscall name="getsockname" number="51"/> <syscall name="getpeername" number="52"/> <syscall name="socketpair" number="53"/> <syscall name="setsockopt" number="54"/> <syscall name="getsockopt" number="55"/> <syscall name="clone" number="56"/> <syscall name="fork" number="57"/> <syscall name="vfork" number="58"/> <syscall name="execve" number="59"/> <syscall name="exit" number="60"/> <syscall name="wait4" number="61"/> <syscall name="kill" number="62"/> <syscall name="uname" number="63"/> <syscall name="semget" number="64"/> <syscall name="semop" number="65"/> <syscall name="semctl" number="66"/> <syscall name="shmdt" number="67"/> <syscall name="msgget" number="68"/> <syscall name="msgsnd" number="69"/> <syscall name="msgrcv" number="70"/> <syscall name="msgctl" number="71"/> <syscall name="fcntl" number="72"/> <syscall name="flock" number="73"/> <syscall name="fsync" number="74"/> <syscall name="fdatasync" number="75"/> <syscall name="truncate" number="76"/> <syscall name="ftruncate" number="77"/> <syscall name="getdents" number="78"/> <syscall name="getcwd" number="79"/> <syscall name="chdir" number="80"/> <syscall name="fchdir" number="81"/> <syscall name="rename" number="82"/> <syscall name="mkdir" number="83"/> <syscall name="rmdir" number="84"/> <syscall name="creat" number="85"/> <syscall name="link" number="86"/> <syscall name="unlink" number="87"/> <syscall name="symlink" number="88"/> <syscall name="readlink" number="89"/> <syscall name="chmod" number="90"/> <syscall name="fchmod" number="91"/> <syscall name="chown" number="92"/> <syscall name="fchown" number="93"/> <syscall name="lchown" number="94"/> <syscall name="umask" number="95"/> <syscall name="gettimeofday" number="96"/> <syscall name="getrlimit" number="97"/> <syscall name="getrusage" number="98"/> <syscall name="sysinfo" number="99"/> <syscall name="times" number="100"/> <syscall name="ptrace" number="101"/> <syscall name="getuid" number="102"/> <syscall name="syslog" number="103"/> <syscall name="getgid" number="104"/> <syscall name="setuid" number="105"/> <syscall name="setgid" number="106"/> <syscall name="geteuid" number="107"/> <syscall name="getegid" number="108"/> <syscall name="setpgid" number="109"/> <syscall name="getppid" number="110"/> <syscall name="getpgrp" number="111"/> <syscall name="setsid" number="112"/> <syscall name="setreuid" number="113"/> <syscall name="setregid" number="114"/> <syscall name="getgroups" number="115"/> <syscall name="setgroups" number="116"/> <syscall name="setresuid" number="117"/> <syscall name="getresuid" number="118"/> <syscall name="setresgid" number="119"/> <syscall name="getresgid" number="120"/> <syscall name="getpgid" number="121"/> <syscall name="setfsuid" number="122"/> <syscall name="setfsgid" number="123"/> <syscall name="getsid" number="124"/> <syscall name="capget" number="125"/> <syscall name="capset" number="126"/> <syscall name="rt_sigpending" number="127"/> <syscall name="rt_sigtimedwait" number="128"/> <syscall name="rt_sigqueueinfo" number="129"/> <syscall name="rt_sigsuspend" number="130"/> <syscall name="sigaltstack" number="131"/> <syscall name="utime" number="132"/> <syscall name="mknod" number="133"/> <syscall name="uselib" number="134"/> <syscall name="personality" number="135"/> <syscall name="ustat" number="136"/> <syscall name="statfs" number="137"/> <syscall name="fstatfs" number="138"/> <syscall name="sysfs" number="139"/> <syscall name="getpriority" number="140"/> <syscall name="setpriority" number="141"/> <syscall name="sched_setparam" number="142"/> <syscall name="sched_getparam" number="143"/> <syscall name="sched_setscheduler" number="144"/> <syscall name="sched_getscheduler" number="145"/> <syscall name="sched_get_priority_max" number="146"/> <syscall name="sched_get_priority_min" number="147"/> <syscall name="sched_rr_get_interval" number="148"/> <syscall name="mlock" number="149"/> <syscall name="munlock" number="150"/> <syscall name="mlockall" number="151"/> <syscall name="munlockall" number="152"/> <syscall name="vhangup" number="153"/> <syscall name="modify_ldt" number="154"/> <syscall name="pivot_root" number="155"/> <syscall name="_sysctl" number="156"/> <syscall name="prctl" number="157"/> <syscall name="arch_prctl" number="158"/> <syscall name="adjtimex" number="159"/> <syscall name="setrlimit" number="160"/> <syscall name="chroot" number="161"/> <syscall name="sync" number="162"/> <syscall name="acct" number="163"/> <syscall name="settimeofday" number="164"/> <syscall name="mount" number="165"/> <syscall name="umount2" number="166"/> <syscall name="swapon" number="167"/> <syscall name="swapoff" number="168"/> <syscall name="reboot" number="169"/> <syscall name="sethostname" number="170"/> <syscall name="setdomainname" number="171"/> <syscall name="iopl" number="172"/> <syscall name="ioperm" number="173"/> <syscall name="create_module" number="174"/> <syscall name="init_module" number="175"/> <syscall name="delete_module" number="176"/> <syscall name="get_kernel_syms" number="177"/> <syscall name="query_module" number="178"/> <syscall name="quotactl" number="179"/> <syscall name="nfsservctl" number="180"/> <syscall name="getpmsg" number="181"/> <syscall name="putpmsg" number="182"/> <syscall name="afs_syscall" number="183"/> <syscall name="tuxcall" number="184"/> <syscall name="security" number="185"/> <syscall name="gettid" number="186"/> <syscall name="readahead" number="187"/> <syscall name="setxattr" number="188"/> <syscall name="lsetxattr" number="189"/> <syscall name="fsetxattr" number="190"/> <syscall name="getxattr" number="191"/> <syscall name="lgetxattr" number="192"/> <syscall name="fgetxattr" number="193"/> <syscall name="listxattr" number="194"/> <syscall name="llistxattr" number="195"/> <syscall name="flistxattr" number="196"/> <syscall name="removexattr" number="197"/> <syscall name="lremovexattr" number="198"/> <syscall name="fremovexattr" number="199"/> <syscall name="tkill" number="200"/> <syscall name="time" number="201"/> <syscall name="futex" number="202"/> <syscall name="sched_setaffinity" number="203"/> <syscall name="sched_getaffinity" number="204"/> <syscall name="set_thread_area" number="205"/> <syscall name="io_setup" number="206"/> <syscall name="io_destroy" number="207"/> <syscall name="io_getevents" number="208"/> <syscall name="io_submit" number="209"/> <syscall name="io_cancel" number="210"/> <syscall name="get_thread_area" number="211"/> <syscall name="lookup_dcookie" number="212"/> <syscall name="epoll_create" number="213"/> <syscall name="epoll_ctl_old" number="214"/> <syscall name="epoll_wait_old" number="215"/> <syscall name="remap_file_pages" number="216"/> <syscall name="getdents64" number="217"/> <syscall name="set_tid_address" number="218"/> <syscall name="restart_syscall" number="219"/> <syscall name="semtimedop" number="220"/> <syscall name="fadvise64" number="221"/> <syscall name="timer_create" number="222"/> <syscall name="timer_settime" number="223"/> <syscall name="timer_gettime" number="224"/> <syscall name="timer_getoverrun" number="225"/> <syscall name="timer_delete" number="226"/> <syscall name="clock_settime" number="227"/> <syscall name="clock_gettime" number="228"/> <syscall name="clock_getres" number="229"/> <syscall name="clock_nanosleep" number="230"/> <syscall name="exit_group" number="231"/> <syscall name="epoll_wait" number="232"/> <syscall name="epoll_ctl" number="233"/> <syscall name="tgkill" number="234"/> <syscall name="utimes" number="235"/> <syscall name="vserver" number="236"/> <syscall name="mbind" number="237"/> <syscall name="set_mempolicy" number="238"/> <syscall name="get_mempolicy" number="239"/> <syscall name="mq_open" number="240"/> <syscall name="mq_unlink" number="241"/> <syscall name="mq_timedsend" number="242"/> <syscall name="mq_timedreceive" number="243"/> <syscall name="mq_notify" number="244"/> <syscall name="mq_getsetattr" number="245"/> <syscall name="kexec_load" number="246"/> <syscall name="waitid" number="247"/> <syscall name="add_key" number="248"/> <syscall name="request_key" number="249"/> <syscall name="keyctl" number="250"/> <syscall name="ioprio_set" number="251"/> <syscall name="ioprio_get" number="252"/> <syscall name="inotify_init" number="253"/> <syscall name="inotify_add_watch" number="254"/> <syscall name="inotify_rm_watch" number="255"/> <syscall name="migrate_pages" number="256"/> <syscall name="openat" number="257"/> <syscall name="mkdirat" number="258"/> <syscall name="mknodat" number="259"/> <syscall name="fchownat" number="260"/> <syscall name="futimesat" number="261"/> <syscall name="newfstatat" number="262"/> <syscall name="unlinkat" number="263"/> <syscall name="renameat" number="264"/> <syscall name="linkat" number="265"/> <syscall name="symlinkat" number="266"/> <syscall name="readlinkat" number="267"/> <syscall name="fchmodat" number="268"/> <syscall name="faccessat" number="269"/> <syscall name="pselect6" number="270"/> <syscall name="ppoll" number="271"/> <syscall name="unshare" number="272"/> <syscall name="set_robust_list" number="273"/> <syscall name="get_robust_list" number="274"/> <syscall name="splice" number="275"/> <syscall name="tee" number="276"/> <syscall name="sync_file_range" number="277"/> <syscall name="vmsplice" number="278"/> <syscall name="move_pages" number="279"/> <syscall name="utimensat" number="280"/> <syscall name="epoll_pwait" number="281"/> <syscall name="signalfd" number="282"/> <syscall name="timerfd_create" number="283"/> <syscall name="eventfd" number="284"/> <syscall name="fallocate" number="285"/> <syscall name="timerfd_settime" number="286"/> <syscall name="timerfd_gettime" number="287"/> <syscall name="accept4" number="288"/> <syscall name="signalfd4" number="289"/> <syscall name="eventfd2" number="290"/> <syscall name="epoll_create1" number="291"/> <syscall name="dup3" number="292"/> <syscall name="pipe2" number="293"/> <syscall name="inotify_init1" number="294"/> <syscall name="preadv" number="295"/> <syscall name="pwritev" number="296"/> </syscalls_info>
{ "content_hash": "7ea963dc034278afa1ccd73434b77db4", "timestamp": "", "source": "github", "line_count": 314, "max_line_length": 73, "avg_line_length": 41.589171974522294, "alnum_prop": 0.6620721341603492, "repo_name": "Ebiroll/qemu_esp32", "id": "171ca92c8a0e2346fe31f04e4aec0d1cfc20f086", "size": "13059", "binary": false, "copies": "70", "ref": "refs/heads/master", "path": "gdb/syscalls/amd64-linux.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "421980" }, { "name": "C++", "bytes": "141156" }, { "name": "CMake", "bytes": "17409" }, { "name": "Dockerfile", "bytes": "1079" }, { "name": "GDB", "bytes": "3176" }, { "name": "Makefile", "bytes": "699" }, { "name": "QMake", "bytes": "1480" }, { "name": "Shell", "bytes": "228" } ], "symlink_target": "" }
#import "CCBPublisherTemplate.h" @implementation CCBPublisherTemplate @synthesize contents; - (id) initWithTemplateFile:(NSString*)fileName { self = [super init]; if (!self) return NULL; NSString* absFile = [[NSBundle mainBundle] pathForResource:fileName ofType:@"" inDirectory:@"publishTemplates"]; //NSLog(@"fileName: %@ absFile: %@", fileName, absFile); self.contents = [NSString stringWithContentsOfFile:absFile encoding:NSUTF8StringEncoding error:NULL]; //NSLog(@"initWithTemplateFile: %@ contents: %@", fileName, contents); return self; } + (id) templateWithFile:(NSString*)fileName { return [[[self alloc] initWithTemplateFile:fileName] autorelease]; } - (void) setString:(NSString*)str forMarker:(NSString*)marker { self.contents = [contents stringByReplacingOccurrencesOfString:[NSString stringWithFormat:@"<#%@#>",marker] withString:str]; } - (void) setStrings:(NSArray*)strs forMarker:(NSString*)marker prefix:(NSString*)prefix suffix:(NSString*)suffix { NSString* complete = @""; for (NSString* inner in strs) { NSString* str = [NSString stringWithFormat:@"%@%@%@",prefix,inner,suffix]; complete = [complete stringByAppendingString:str]; } [self setString:complete forMarker:marker]; } - (void) writeToFile:(NSString*)fileName { [contents writeToFile:fileName atomically:YES encoding:NSUTF8StringEncoding error:NULL]; //NSLog(@"writeToFile: %@ contents: %@", fileName, contents); } - (void) dealloc { [contents release]; [super dealloc]; } @end
{ "content_hash": "227a5765f75c2ff860e24d99ddb3892f", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 128, "avg_line_length": 26.516666666666666, "alnum_prop": 0.688874921433061, "repo_name": "JerryWong0119/CocosBuilder-3.0-alpha5", "id": "6b2e12c6ce4fbda926e694c3435b9202a3a4c228", "size": "2753", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "CocosBuilder/ccBuilder/CCBPublisherTemplate.m", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "905576" }, { "name": "C++", "bytes": "111954" }, { "name": "DTrace", "bytes": "12324" }, { "name": "Erlang", "bytes": "2736" }, { "name": "Groff", "bytes": "19312" }, { "name": "Groovy", "bytes": "5365" }, { "name": "HTML", "bytes": "17681003" }, { "name": "JavaScript", "bytes": "356903" }, { "name": "M", "bytes": "333590" }, { "name": "Matlab", "bytes": "1875" }, { "name": "Objective-C", "bytes": "5748278" }, { "name": "Objective-C++", "bytes": "162251" }, { "name": "Perl", "bytes": "216789" }, { "name": "Python", "bytes": "24184" }, { "name": "Shell", "bytes": "6683" } ], "symlink_target": "" }
@interface RCMContextExecutor : NSObject - (void)executeJavascript; @end
{ "content_hash": "dbc23bc5dec940c092d2aaac9a2503ae", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 40, "avg_line_length": 15, "alnum_prop": 0.7866666666666666, "repo_name": "BenHuiHui/React-Native-OSX", "id": "580b7b8393009693238548c02dafd95cf38855d3", "size": "298", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Experimental/ground up/ReactNativeMacLib/ReactNativeMacLib/ReactNativeMacLib/Executors/RCMContextExecutor.h", "mode": "33188", "license": "mit", "language": [ { "name": "AppleScript", "bytes": "1171" }, { "name": "C", "bytes": "34277" }, { "name": "HTML", "bytes": "5345" }, { "name": "JavaScript", "bytes": "125839" }, { "name": "Objective-C", "bytes": "76915" }, { "name": "Shell", "bytes": "1008" }, { "name": "Swift", "bytes": "3772" } ], "symlink_target": "" }
package com.antoniocappiello.curriculumvitae.presenter.parser; import com.antoniocappiello.curriculumvitae.model.Education; import com.antoniocappiello.curriculumvitae.presenter.DateUtils; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.orhanobut.logger.Logger; import org.json.JSONException; import java.text.ParseException; import java.util.ArrayList; import java.util.Date; import java.util.List; import static com.antoniocappiello.curriculumvitae.presenter.webapi.WebApiFields.EDUCATION; import static com.antoniocappiello.curriculumvitae.presenter.webapi.WebApiFields.LOGO_URL; import static com.antoniocappiello.curriculumvitae.presenter.webapi.WebApiFields.NAME; import static com.antoniocappiello.curriculumvitae.presenter.webapi.WebApiFields.PROVIDER; import static com.antoniocappiello.curriculumvitae.presenter.webapi.WebApiFields.TYPE; import static com.antoniocappiello.curriculumvitae.presenter.webapi.WebApiFields.YEAR; public class EducationJsonParser { public static List<Education> parse(JsonObject json) throws JSONException { JsonArray educationJsonArray = json.get(EDUCATION).getAsJsonArray(); List<Education> educationList = new ArrayList<>(educationJsonArray.size()); for(JsonElement educationJsonElement : educationJsonArray){ Education education = parseSingle(educationJsonElement.getAsJsonObject()); educationList.add(education); } return educationList; } private static Education parseSingle(JsonObject json) { Date date = null; try { date = DateUtils.dateFromYear(json.has(YEAR) ? json.get(YEAR).getAsString() : ""); } catch (ParseException e) { Logger.e(e.toString()); } return new Education.Builder() .type(json.has(TYPE) ? json.get(TYPE).getAsString() : "") .provider(json.has(PROVIDER) ? json.get(PROVIDER).getAsString() : "") .logoUrl(json.has(LOGO_URL) ? json.get(LOGO_URL).getAsString() : "") .name(json.has(NAME) ? json.get(NAME).getAsString() : "") .year(date) .build(); } }
{ "content_hash": "46fee541f6828bbc54e7fc303e9d02d0", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 94, "avg_line_length": 42.056603773584904, "alnum_prop": 0.7200538358008075, "repo_name": "AntonioCappiello/curriculum-vitae", "id": "6357127c9bbc047071cae5c9431110764e64b428", "size": "2366", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/com/antoniocappiello/curriculumvitae/presenter/parser/EducationJsonParser.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "82418" } ], "symlink_target": "" }
/*************************************************************************/ /* particle_system_sw.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ /* "Software"), to deal in the Software without restriction, including */ /* without limitation the rights to use, copy, modify, merge, publish, */ /* distribute, sublicense, and/or sell copies of the Software, and to */ /* permit persons to whom the Software is furnished to do so, subject to */ /* the following conditions: */ /* */ /* The above copyright notice and this permission notice shall be */ /* included in all copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #ifndef PARTICLE_SYSTEM_SW_H #define PARTICLE_SYSTEM_SW_H /** @author Juan Linietsky <reduzio@gmail.com> */ #include "servers/visual_server.h" struct ParticleSystemSW { enum { MAX_PARTICLES=1024 }; float particle_vars[VS::PARTICLE_VAR_MAX]; float particle_randomness[VS::PARTICLE_VAR_MAX]; Vector3 emission_half_extents; DVector<Vector3> emission_points; Vector3 gravity_normal; Vector3 emission_base_velocity; int amount; bool emitting; bool height_from_velocity; AABB visibility_aabb; bool sort; bool local_coordinates; struct ColorPhase { float pos; Color color; ColorPhase() { pos=1.0; color=Color(0.0,0.0,1.0,1.0); } }; int color_phase_count; ColorPhase color_phases[VS::MAX_PARTICLE_COLOR_PHASES]; struct Attractor { Vector3 pos; float force; }; int attractor_count; Attractor attractors[VS::MAX_PARTICLE_ATTRACTORS]; ParticleSystemSW(); ~ParticleSystemSW(); }; struct ParticleSystemProcessSW { enum { PARTICLE_RANDOM_NUMBERS = 8, }; struct ParticleData { Vector3 pos; Vector3 vel; float rot; bool active; float random[PARTICLE_RANDOM_NUMBERS]; ParticleData() { active=0; rot=0; } }; bool valid; float particle_system_time; uint32_t rand_seed; Vector<ParticleData> particle_data; void process(const ParticleSystemSW *p_system,const Transform& p_transform,float p_time); ParticleSystemProcessSW(); }; struct ParticleSystemDrawInfoSW { struct ParticleDrawInfo { const ParticleSystemProcessSW::ParticleData *data; float d; Transform transform; Color color; }; ParticleDrawInfo draw_info[ParticleSystemSW::MAX_PARTICLES]; ParticleDrawInfo *draw_info_order[ParticleSystemSW::MAX_PARTICLES]; void prepare(const ParticleSystemSW *p_system,const ParticleSystemProcessSW *p_process,const Transform& p_system_transform,const Transform& p_camera_transform); }; #endif
{ "content_hash": "eaa1c6da014ef8cffa4ed370bc3fa7aa", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 161, "avg_line_length": 30.641221374045802, "alnum_prop": 0.5774788241155954, "repo_name": "crr0004/godot", "id": "9a176ba0d4abb5970a257a493a814051d18a17f7", "size": "4014", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "servers/visual/particle_system_sw.h", "mode": "33188", "license": "mit", "language": [ { "name": "ActionScript", "bytes": "6955" }, { "name": "Assembly", "bytes": "372477" }, { "name": "Batchfile", "bytes": "2356" }, { "name": "C", "bytes": "25775334" }, { "name": "C++", "bytes": "12160301" }, { "name": "DIGITAL Command Language", "bytes": "95419" }, { "name": "GAP", "bytes": "3659" }, { "name": "GDScript", "bytes": "83943" }, { "name": "GLSL", "bytes": "57049" }, { "name": "HTML", "bytes": "9365" }, { "name": "Java", "bytes": "439345" }, { "name": "JavaScript", "bytes": "5802" }, { "name": "Matlab", "bytes": "2076" }, { "name": "Objective-C", "bytes": "43300" }, { "name": "Objective-C++", "bytes": "143251" }, { "name": "PHP", "bytes": "1095905" }, { "name": "Perl", "bytes": "1939071" }, { "name": "Python", "bytes": "128284" }, { "name": "Shell", "bytes": "1054" }, { "name": "XS", "bytes": "4319" }, { "name": "eC", "bytes": "3710" } ], "symlink_target": "" }
from GitClient import GitClient from JumpScale import j class GitFactory: def __init__(self): j.logger.consolelogCategories.append("git") def getClient(self, basedir, remoteUrl="", branchname='master', cleandir=False,login=None,passwd=None): """ return a mercurial tool which you can help to manipulate a hg repository @param base dir where local gitrepository will be stored @param remote url of git repository, e.g. https://login:passwd@bitbucket.org/despiegk/ssospecs/ #DO NOT FORGET LOGIN PASSWD """ if not isinstance(cleandir, bool): raise ValueError("cleandir needs to be boolean") return GitClient(basedir, remoteUrl, branchname, cleandir,login=login,passwd=passwd) def log(self,msg,category="",level=5): category="git.%s"%category category=category.rstrip(".") j.logger.log(msg,category=category,level=level)
{ "content_hash": "c8c52ec8cd91cb10dbfec8904908cb2b", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 132, "avg_line_length": 42.45454545454545, "alnum_prop": 0.684154175588865, "repo_name": "Jumpscale/jumpscale6_core", "id": "adf8719c51dc3f1650693e0c333702e2399b47d3", "size": "934", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/JumpScale/baselib/git/GitFactory.py", "mode": "33261", "license": "bsd-2-clause", "language": [ { "name": "CSS", "bytes": "3681" }, { "name": "HTML", "bytes": "11738" }, { "name": "JavaScript", "bytes": "70132" }, { "name": "Lua", "bytes": "2162" }, { "name": "Python", "bytes": "5848017" }, { "name": "Shell", "bytes": "7692" } ], "symlink_target": "" }
module SevenThree.Model { //パラメーター import IMember = SevenThree.Model.IMember; export class Member implements IMember{ id: number; name: string; right: number; wrong: number; state: State; isSelected: boolean; constructor(name: string, id: number){ this.id = id; this.name = name; this.right = 30; this.state = State.Normal; this.isSelected = false; } to_s(): string { return this.id + "," + this.name + "," + this.right + "," + this.state; } rewriteMember(s: string): void { var ss = s.split(","); this.id = parseInt(ss[0]); this.name = ss[1]; this.right = parseInt(ss[2]); this.state = parseInt(ss[3]); } } }
{ "content_hash": "b6c98e5ba2629bcef8c6350e24a38e8c", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 77, "avg_line_length": 22.303030303030305, "alnum_prop": 0.5597826086956522, "repo_name": "aleo724/aqt2nd", "id": "30da33fe20d7fa8277ab72c7e873a553a2920f46", "size": "784", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "ts/SF/Member3R.ts", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "3244" }, { "name": "HTML", "bytes": "12089" }, { "name": "JavaScript", "bytes": "68349" }, { "name": "TypeScript", "bytes": "34002" } ], "symlink_target": "" }
#include <Kernel/Kernel.h> #include <Kernel/Hat.h> #include <Kernel/VMPage.h> /* Define this to be the max number of VM regions the loader will hand us. We keep regions around for quick lookups */ #define MAX_REGIONS 25 static TAILQ_HEAD(, VMPage) freeList = TAILQ_HEAD_INITIALIZER(freeList); static TAILQ_HEAD(, VMPage) usedList = TAILQ_HEAD_INITIALIZER(usedList); PAddr physFree = 0; struct { PAddr RegionStart; PAddr RegionEnd; VMPage *Page; } Regions[MAX_REGIONS]; u32 lastRegion = 0; #define PAGE_ROUNDUP(x) x #define PAGE_ROUNDDN(x) x #define PAGE_SIZE 4096 static void VMPagePushToFree(VMPage *vmp){ TAILQ_INSERT_HEAD(&freeList,vmp,Pageq); physFree += PAGE_SIZE; } void VMPagePrintStats(){ printf("Free Memory: %i K\n", physFree/1024); } void * VMPageAddFree(void * base, PAddr freeBegin, PAddr freeEnd){ if(lastRegion > MAX_REGIONS){ panic("Please increase MAX_REGIONS"); } Regions[lastRegion].RegionStart = freeBegin; Regions[lastRegion].RegionEnd = freeEnd; Regions[lastRegion].Page = (VMPage *)base; lastRegion++; PAddr idx = PAGE_ROUNDUP(freeBegin); VMPage *vmp = (VMPage *)base; while(idx < freeEnd){ vmp->Phys = idx; vmp->Offset = VMPAGE_LONE; VMPagePushToFree(vmp); idx += PAGE_SIZE; vmp++; } printf("VMPage: 0x%x-0x%x available\n", freeBegin, freeEnd); }
{ "content_hash": "437919c51eeefcb76bfba3f6f8d06ee8", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 74, "avg_line_length": 23.233333333333334, "alnum_prop": 0.6743185078909613, "repo_name": "gaze/Vanguard", "id": "4bbf39f89bb9b19d017cb594cbaba884fa1c9724", "size": "1509", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Projects/Kernel/VM/VMPage.c", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "23522" }, { "name": "C++", "bytes": "32645" }, { "name": "Shell", "bytes": "959" } ], "symlink_target": "" }
using System; using System.Linq; using System.Threading.Tasks; using FluentAssertions; using Nest; using Tests.Framework; using Tests.Framework.Integration; using Tests.Framework.MockData; using static Nest.Infer; namespace Tests.Search.Request { public class FieldsUsageTests : SearchUsageTestBase { public FieldsUsageTests(ReadOnlyCluster cluster, EndpointUsage usage) : base(cluster, usage) { } protected override object ExpectJson => new { fields = new[] { "name", "startedOn" } }; protected override Func<SearchDescriptor<Project>, ISearchRequest> Fluent => s => s .Fields(fs => fs .Field(p => p.Name) .Field(p => p.StartedOn) ); protected override SearchRequest<Project> Initializer => new SearchRequest<Project> { Fields = Fields<Project>(p => p.Name, p => p.StartedOn) }; [I] protected Task FieldsAreReturned() => this.AssertOnAllResponses(r => { r.Fields.Should().NotBeNull(); r.Fields.Count().Should().BeGreaterThan(0); foreach (var fieldValues in r.Fields) { fieldValues.Count().Should().Be(2); var name = fieldValues.Value<string>(Field<Project>(p => p.Name)); name.Should().NotBeNullOrWhiteSpace(); var dateTime = fieldValues.ValueOf<Project, DateTime>(p => p.StartedOn); dateTime.Should().BeAfter(default(DateTime)); } }); } }
{ "content_hash": "0beef7351ea11d00a44247c2a1cd6b6f", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 98, "avg_line_length": 27.224489795918366, "alnum_prop": 0.697151424287856, "repo_name": "cstlaurent/elasticsearch-net", "id": "acb2b5096982ccd28b94d3b1ad49c401d4db9e21", "size": "1336", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/Tests/Search/Request/FieldsUsageTests.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "1521" }, { "name": "C#", "bytes": "5625882" }, { "name": "F#", "bytes": "40135" }, { "name": "HTML", "bytes": "125310" }, { "name": "Shell", "bytes": "698" }, { "name": "Smalltalk", "bytes": "3426" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.gridview" > <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name=".MainActivity" android:label="@string/app_name" android:theme="@style/Base.Theme.AppCompat.Light.Dialog"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
{ "content_hash": "409a422ade7c312091934c7559d1d124", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 76, "avg_line_length": 34.27272727272727, "alnum_prop": 0.6021220159151194, "repo_name": "wing2407/GridView", "id": "3a07c3eaef9ee29d3b7fa641f495e544a9e9ae3a", "size": "754", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/AndroidManifest.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "10301" } ], "symlink_target": "" }
This tool allows you to query the size of any Earth Engine asset[Images, Image Collections, Tables and Folders] and prints out the number of assets and total asset size in non-byte encoding meaning KB, MB, GB, TB depending on size. ![geeadd_size](https://user-images.githubusercontent.com/6677629/80339754-55a4f000-882d-11ea-928c-2434de130078.gif) ``` > geeadd assetsize -h usage: geeadd assetsize [-h] --asset ASSET optional arguments: -h, --help show this help message and exit Required named arguments.: --asset ASSET Earth Engine Asset for which to get size properties ```
{ "content_hash": "7c8ccfcb4e7a227bae7d05ffd439c04e", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 231, "avg_line_length": 42.142857142857146, "alnum_prop": 0.7593220338983051, "repo_name": "samapriya/gee_asset_manager_addon", "id": "a1b95c523bf71560580bb7743c16f94eab53541e", "size": "604", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/projects/size.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Python", "bytes": "70271" } ], "symlink_target": "" }
package org.sikuli.ide; import java.awt.*; import javax.swing.JTextPane; import javax.swing.event.CaretEvent; import javax.swing.event.CaretListener; import javax.swing.text.*; public class CurrentLineHighlighter implements CaretListener { static final Color DEFAULT_COLOR = new Color(230, 230, 210); static final Color ERROR_COLOR = new Color(255, 105, 105); private Highlighter.HighlightPainter painter, errorPainter; private Object highlight; private int _errorLine=-1; public CurrentLineHighlighter(JTextPane textPane) { this(textPane, null); } public CurrentLineHighlighter(JTextPane textPane, Color highlightColor) { Color c = highlightColor != null ? highlightColor : DEFAULT_COLOR; MyHighlighter h = new MyHighlighter(); textPane.setHighlighter(h); painter = new DefaultHighlighter.DefaultHighlightPainter(c); errorPainter = new DefaultHighlighter.DefaultHighlightPainter(ERROR_COLOR); } public void setErrorLine(int lineNo){ _errorLine = lineNo-1; } public void caretUpdate(CaretEvent evt) { JTextComponent comp = (JTextComponent)evt.getSource(); if (comp != null && highlight != null) { comp.getHighlighter().removeHighlight(highlight); highlight = null; } // cancel line highlighting if selection exists if( comp.getSelectionStart() != comp.getSelectionEnd() ){ comp.repaint(); return; } int pos = comp.getCaretPosition(); Element elem = Utilities.getParagraphElement(comp, pos); int start = elem.getStartOffset(); int end = elem.getEndOffset(); Document doc = comp.getDocument(); Element root = doc.getDefaultRootElement(); int lineIdx = root.getElementIndex(pos); Highlighter.HighlightPainter p = painter; if(lineIdx == _errorLine) p = errorPainter; try { highlight = comp.getHighlighter().addHighlight(start, end, p); comp.repaint(); } catch (BadLocationException ex) { ex.printStackTrace(); } } } class MyHighlighter extends DefaultHighlighter { private JTextComponent component; /** * @see javax.swing.text.DefaultHighlighter#install(javax.swing.text.JTextComponent) */ @Override public final void install(final JTextComponent c) { super.install(c); this.component = c; } /** * @see javax.swing.text.DefaultHighlighter#deinstall(javax.swing.text.JTextComponent) */ @Override public final void deinstall(final JTextComponent c) { super.deinstall(c); this.component = null; } /** * Same algo, except width is not modified with the insets. * * @see javax.swing.text.DefaultHighlighter#paint(java.awt.Graphics) */ @Override public final void paint(final Graphics g) { final Highlighter.Highlight[] highlights = getHighlights(); final int len = highlights.length; for (int i = 0; i < len; i++) { Highlighter.Highlight info = highlights[i]; if (info.getClass().getName().indexOf("LayeredHighlightInfo") > -1) { // Avoid allocing unless we need it. final Rectangle a = this.component.getBounds(); final Insets insets = this.component.getInsets(); a.x = insets.left; a.y = insets.top; // a.width -= insets.left + insets.right + 100; a.height -= insets.top + insets.bottom; //FIXME: should shift up.. for (; i < len; i++) { info = highlights[i]; if (info.getClass().getName().indexOf( "LayeredHighlightInfo") > -1) { final Highlighter.HighlightPainter p = info .getPainter(); p.paint(g, info.getStartOffset(), info .getEndOffset(), a, this.component); } } } } } }
{ "content_hash": "64d76fdba8f12cbd96ddb03826e32b0e", "timestamp": "", "source": "github", "line_count": 142, "max_line_length": 89, "avg_line_length": 29.47887323943662, "alnum_prop": 0.5922121356903965, "repo_name": "sikuli/sikuli", "id": "4802156e02584734949a799f2630f111e757505f", "size": "4265", "binary": false, "copies": "3", "ref": "refs/heads/develop", "path": "sikuli-ide/src/main/java/org/sikuli/ide/CurrentLineHighlighter.java", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "687" }, { "name": "C", "bytes": "4033" }, { "name": "C++", "bytes": "198803" }, { "name": "CMake", "bytes": "54481" }, { "name": "CSS", "bytes": "9821" }, { "name": "HTML", "bytes": "3477218" }, { "name": "Java", "bytes": "1571495" }, { "name": "JavaScript", "bytes": "63045" }, { "name": "Makefile", "bytes": "831" }, { "name": "Objective-C", "bytes": "6872" }, { "name": "Python", "bytes": "108606" }, { "name": "Roff", "bytes": "3041" }, { "name": "Shell", "bytes": "2533" } ], "symlink_target": "" }